<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/* x509-2.1.2.js (c) 2012-2023 Kenji Urushima | kjur.github.io/jsrsasign/license
<span class='line'>  2</span>  */</span><span class="WHIT">
<span class='line'>  3</span> </span><span class="COMM">/*
<span class='line'>  4</span>  * x509.js - X509 class to read subject public key from certificate.
<span class='line'>  5</span>  *
<span class='line'>  6</span>  * Copyright (c) 2010-2022 Kenji Urushima (kenji.urushima@gmail.com)
<span class='line'>  7</span>  *
<span class='line'>  8</span>  * This software is licensed under the terms of the MIT License.
<span class='line'>  9</span>  * https://kjur.github.io/jsrsasign/license
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * The above copyright and license notice shall be
<span class='line'> 12</span>  * included in all copies or substantial portions of the Software.
<span class='line'> 13</span>  */</span><span class="WHIT">
<span class='line'> 14</span> 
<span class='line'> 15</span> </span><span class="COMM">/**
<span class='line'> 16</span>  * @fileOverview
<span class='line'> 17</span>  * @name x509-1.1.js
<span class='line'> 18</span>  * @author Kenji Urushima kenji.urushima@gmail.com
<span class='line'> 19</span>  * @version jsrsasign 10.7.0 x509 2.1.2 (2023-Mar-11)
<span class='line'> 20</span>  * @since jsrsasign 1.x.x
<span class='line'> 21</span>  * @license &lt;a href="https://kjur.github.io/jsrsasign/license/">MIT License&lt;/a>
<span class='line'> 22</span>  */</span><span class="WHIT">
<span class='line'> 23</span> 
<span class='line'> 24</span> </span><span class="COMM">/**
<span class='line'> 25</span>  * hexadecimal X.509 certificate ASN.1 parser class.&lt;br/>
<span class='line'> 26</span>  * @class hexadecimal X.509 certificate ASN.1 parser class
<span class='line'> 27</span>  * @property {String} hex hexacedimal string for X.509 certificate.
<span class='line'> 28</span>  * @property {Number} version format version (1: X509v1, 3: X509v3, otherwise: unknown) since jsrsasign 7.1.4
<span class='line'> 29</span>  * @property {Array} aExtInfo (DEPRECATED) array of parameters for extensions
<span class='line'> 30</span>  * @author Kenji Urushima
<span class='line'> 31</span>  * @version 1.0.1 (08 May 2012)
<span class='line'> 32</span>  * @see &lt;a href="https://kjur.github.io/jsrsasigns/">'jsrsasign'(RSA Sign JavaScript Library) home page https://kjur.github.io/jsrsasign/&lt;/a>
<span class='line'> 33</span>  * @description
<span class='line'> 34</span>  * X509 class provides following functionality:
<span class='line'> 35</span>  * &lt;ul>
<span class='line'> 36</span>  * &lt;li>parse X.509 certificate ASN.1 structure&lt;/li>
<span class='line'> 37</span>  * &lt;li>get basic fields, extensions, signature algorithms and signature values&lt;/li>
<span class='line'> 38</span>  * &lt;li>read PEM certificate&lt;/li>
<span class='line'> 39</span>  * &lt;/ul>
<span class='line'> 40</span>  *
<span class='line'> 41</span>  * &lt;ul>
<span class='line'> 42</span>  * &lt;li>&lt;b>TO GET FIELDS&lt;/b>
<span class='line'> 43</span>  *   &lt;ul>
<span class='line'> 44</span>  *   &lt;li>serial - {@link X509#getSerialNumberHex}&lt;/li>
<span class='line'> 45</span>  *   &lt;li>signature algorithm field - {@link X509#getSignatureAlgorithmField}&lt;/li>
<span class='line'> 46</span>  *   &lt;li>issuer - {@link X509#getIssuerHex}&lt;/li>
<span class='line'> 47</span>  *   &lt;li>issuer - {@link X509#getIssuerString}&lt;/li>
<span class='line'> 48</span>  *   &lt;li>notBefore - {@link X509#getNotBefore}&lt;/li>
<span class='line'> 49</span>  *   &lt;li>notAfter - {@link X509#getNotAfter}&lt;/li>
<span class='line'> 50</span>  *   &lt;li>subject - {@link X509#getSubjectHex}&lt;/li>
<span class='line'> 51</span>  *   &lt;li>subject - {@link X509#getSubjectString}&lt;/li>
<span class='line'> 52</span>  *   &lt;li>subjectPublicKeyInfo - {@link X509#getPublicKey}&lt;/li>
<span class='line'> 53</span>  *   &lt;li>subjectPublicKeyInfo - {@link X509#getPublicKeyHex}&lt;/li>
<span class='line'> 54</span>  *   &lt;li>subjectPublicKeyInfo - {@link X509#getPublicKeyIdx}&lt;/li>
<span class='line'> 55</span>  *   &lt;li>subjectPublicKeyInfo - {@link X509.getPublicKeyFromCertPEM}&lt;/li>
<span class='line'> 56</span>  *   &lt;li>subjectPublicKeyInfo - {@link X509.getPublicKeyFromCertHex}&lt;/li>
<span class='line'> 57</span>  *   &lt;li>subjectPublicKeyInfo - {@link X509#getPublicKeyContentIdx}&lt;/li>
<span class='line'> 58</span>  *   &lt;li>signature algorithm - {@link X509#getSignatureAlgorithmName}&lt;/li>
<span class='line'> 59</span>  *   &lt;li>signature value - {@link X509#getSignatureValueHex}&lt;/li>
<span class='line'> 60</span>  *   &lt;/ul>
<span class='line'> 61</span>  * &lt;/li>
<span class='line'> 62</span>  * &lt;li>&lt;b>X509 METHODS TO GET EXTENSIONS&lt;/b>
<span class='line'> 63</span>  *   &lt;ul>
<span class='line'> 64</span>  *   &lt;li>authorityKeyIdentifier - {@link X509#getExtAuthorityKeyIdentifier}&lt;/li>
<span class='line'> 65</span>  *   &lt;li>subjectKeyIdentifier - {@link X509#getExtSubjectKeyIdentifier}&lt;/li>
<span class='line'> 66</span>  *   &lt;li>keyUsage - {@link X509#getExtKeyUsage}&lt;/li>
<span class='line'> 67</span>  *   &lt;li>keyUsage - {@link X509#getExtKeyUsageBin}&lt;/li>
<span class='line'> 68</span>  *   &lt;li>keyUsage - {@link X509#getExtKeyUsageString}&lt;/li>
<span class='line'> 69</span>  *   &lt;li>certificatePolicies - {@link X509#getExtCertificatePolicies}&lt;/li>
<span class='line'> 70</span>  *   &lt;li>policyMappings - {@link X509#getExtPolicyMappings}&lt;/li>
<span class='line'> 71</span>  *   &lt;li>policyConstraints - {@link X509#getExtPolicyConstraints}&lt;/li>
<span class='line'> 72</span>  *   &lt;li>inhibitAnyPolicy - {@link X509#getExtInhibitAnyPolicy}&lt;/li>
<span class='line'> 73</span>  *   &lt;li>subjectAltName - {@link X509#getExtSubjectAltName}&lt;/li>
<span class='line'> 74</span>  *   &lt;li>subjectAltName2 - {@link X509#getExtSubjectAltName2} (DEPRECATED)&lt;/li>
<span class='line'> 75</span>  *   &lt;li>issuerAltName - {@link X509#getExtIssuerAltName}&lt;/li>
<span class='line'> 76</span>  *   &lt;li>basicConstraints - {@link X509#getExtBasicConstraints}&lt;/li>
<span class='line'> 77</span>  *   &lt;li>nameConstraints - {@link X509#getExtNameConstraints}&lt;/li>
<span class='line'> 78</span>  *   &lt;li>extKeyUsage - {@link X509#getExtExtKeyUsage}&lt;/li>
<span class='line'> 79</span>  *   &lt;li>extKeyUsage - {@link X509#getExtExtKeyUsageName} (DEPRECATED)&lt;/li>
<span class='line'> 80</span>  *   &lt;li>cRLDistributionPoints - {@link X509#getExtCRLDistributionPoints}&lt;/li>
<span class='line'> 81</span>  *   &lt;li>cRLDistributionPoints - {@link X509#getExtCRLDistributionPointsURI} (DEPRECATED)&lt;/li>
<span class='line'> 82</span>  *   &lt;li>authorityInfoAccess - {@link X509#getExtAuthorityInfoAccess}&lt;/li>
<span class='line'> 83</span>  *   &lt;li>authorityInfoAccess - {@link X509#getExtAIAInfo} (DEPRECATED)&lt;/li>
<span class='line'> 84</span>  *   &lt;li>cRLNumber - {@link X509#getExtCRLNumber}&lt;/li>
<span class='line'> 85</span>  *   &lt;li>cRLReason - {@link X509#getExtCRLReason}&lt;/li>
<span class='line'> 86</span>  *   &lt;li>ocspNonce - {@link X509#getExtOcspNonce}&lt;/li>
<span class='line'> 87</span>  *   &lt;li>ocspNoCheck - {@link X509#getExtOcspNoCheck}&lt;/li>
<span class='line'> 88</span>  *   &lt;li>adobeTimeStamp - {@link X509#getExtAdobeTimeStamp}&lt;/li>
<span class='line'> 89</span>  *   &lt;/ul>
<span class='line'> 90</span>  * &lt;/li>
<span class='line'> 91</span>  * &lt;li>&lt;b>UTILITIES&lt;/b>
<span class='line'> 92</span>  *   &lt;ul>
<span class='line'> 93</span>  *   &lt;li>reading PEM X.509 certificate - {@link X509#readCertPEM}&lt;/li>
<span class='line'> 94</span>  *   &lt;li>reading hexadecimal string of X.509 certificate - {@link X509#readCertHex}&lt;/li>
<span class='line'> 95</span>  *   &lt;li>get all certificate information - {@link X509#getInfo}&lt;/li>
<span class='line'> 96</span>  *   &lt;li>get specified extension information - {@link X509#getExtInfo}&lt;/li>
<span class='line'> 97</span>  *   &lt;li>verify signature value - {@link X509#verifySignature}&lt;/li>
<span class='line'> 98</span>  *   &lt;li>utility for extensions - {@link X509#getCriticalExtV}&lt;/li>
<span class='line'> 99</span>  *   &lt;/ul>
<span class='line'>100</span>  * &lt;/li>
<span class='line'>101</span>  * &lt;/ul>
<span class='line'>102</span>  */</span><span class="WHIT">
<span class='line'>103</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">	</span><span class="NAME">_getChildIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getChildIdx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">	</span><span class="NAME">_getV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getV</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">	</span><span class="NAME">_dump</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.dump</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">	</span><span class="NAME">_ASN1HEX_parse</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.parse</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">	</span><span class="NAME">_getTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getTLV</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">	</span><span class="NAME">_getVbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getVbyList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">	</span><span class="NAME">_getVbyListEx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getVbyListEx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="NAME">_getTLVbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getTLVbyList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">	</span><span class="NAME">_getTLVbyListEx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getTLVbyListEx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">	</span><span class="NAME">_getIdxbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getIdxbyList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>115</span> </span><span class="WHIT">	</span><span class="NAME">_getIdxbyListEx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getIdxbyListEx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>116</span> </span><span class="WHIT">	</span><span class="NAME">_getVidx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getVidx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">	</span><span class="NAME">_getInt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getInt</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">	</span><span class="NAME">_oidname</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.oidname</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">	</span><span class="NAME">_hextooidstr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.hextooidstr</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">	</span><span class="NAME">_X509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">	</span><span class="NAME">_pemtohex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pemtohex</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">	</span><span class="NAME">_PSSNAME2ASN1TLV</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">	</span><span class="NAME">_Error</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>124</span> 
<span class='line'>125</span> </span><span class="WHIT">    </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">	</span><span class="NAME">_PSSNAME2ASN1TLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">    </span><span class="NAME">this.HEX2STAG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"0c"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"13"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"16"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">		     </span><span class="STRN">"1a"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"vis"</span><span class="WHIT"> </span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"1e"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"bmp"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>130</span> 
<span class='line'>131</span> </span><span class="WHIT">    </span><span class="NAME">this.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">    </span><span class="NAME">this.version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// version (1: X509v1, 3: X509v3, others: unspecified)</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">    </span><span class="NAME">this.foffset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// field index offset (-1: for X509v1, 0: for X509v3)</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">    </span><span class="NAME">this.aExtInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>135</span> 
<span class='line'>136</span> </span><span class="WHIT">    </span><span class="COMM">// ===== get basic fields from hex =====================================</span><span class="WHIT">
<span class='line'>137</span> 
<span class='line'>138</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>139</span>      * get format version (X.509v1 or v3 certificate)&lt;br/>
<span class='line'>140</span>      * @name getVersion
<span class='line'>141</span>      * @memberOf X509#
<span class='line'>142</span>      * @function
<span class='line'>143</span>      * @return {Number} 1 for X509v1, 3 for X509v3, otherwise 0
<span class='line'>144</span>      * @since jsrsasign 7.1.14 x509 1.1.13
<span class='line'>145</span>      * @description
<span class='line'>146</span>      * This method returns a format version of X.509 certificate.
<span class='line'>147</span>      * It returns 1 for X.509v1 certificate and 3 for v3 certificate.
<span class='line'>148</span>      * Otherwise returns 0.
<span class='line'>149</span>      * This method will be automatically called in
<span class='line'>150</span>      * {@link X509#readCertPEM}. After then, you can use
<span class='line'>151</span>      * {@link X509.version} parameter.
<span class='line'>152</span>      * @example
<span class='line'>153</span>      * var x = new X509();
<span class='line'>154</span>      * x.readCertPEM(sCertPEM);
<span class='line'>155</span>      * version = x.getVersion();    // 1 or 3
<span class='line'>156</span>      * sn = x.getSerialNumberHex(); // return string like "01ad..."
<span class='line'>157</span>      */</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">    </span><span class="NAME">this.getVersion</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.version</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.version</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>160</span> 
<span class='line'>161</span> </span><span class="WHIT">	</span><span class="COMM">// check if the first item of tbsCertificate "[0] { INTEGER 2 }"</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hFirstObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hFirstObj.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hVersionTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">hFirstObj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">iVersion</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getInt</span><span class="PUNC">(</span><span class="NAME">hVersionTLV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">iVersion</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">iVersion</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>167</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed version field"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>168</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">	    </span><span class="NAME">this.version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">iVersion</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.version</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">	    </span><span class="NAME">this.version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">	    </span><span class="NAME">this.foffset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>177</span> 
<span class='line'>178</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>179</span>      * get hexadecimal string of serialNumber field of certificate.&lt;br/>
<span class='line'>180</span>      * @name getSerialNumberHex
<span class='line'>181</span>      * @memberOf X509#
<span class='line'>182</span>      * @function
<span class='line'>183</span>      * @return {String} hexadecimal string of certificate serial number
<span class='line'>184</span>      * @example
<span class='line'>185</span>      * var x = new X509();
<span class='line'>186</span>      * x.readCertPEM(sCertPEM);
<span class='line'>187</span>      * var sn = x.getSerialNumberHex(); // return string like "01ad..."
<span class='line'>188</span>      */</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">    </span><span class="NAME">this.getSerialNumberHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getVbyListEx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"02"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>192</span> 
<span class='line'>193</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>194</span>      * get signature algorithm name in basic field
<span class='line'>195</span>      * @name getSignatureAlgorithmField
<span class='line'>196</span>      * @memberOf X509#
<span class='line'>197</span>      * @function
<span class='line'>198</span>      * @return {String} signature algorithm name (ex. SHA1withRSA, SHA256withECDSA, SHA512withRSAandMGF1)
<span class='line'>199</span>      * @since x509 1.1.8
<span class='line'>200</span>      * @see X509#getAlgorithmIdentifierName
<span class='line'>201</span>      * @description
<span class='line'>202</span>      * This method will get a name of signature algorithm in 
<span class='line'>203</span>      * basic field of certificate.
<span class='line'>204</span>      * &lt;br/>
<span class='line'>205</span>      * NOTE: From jsrsasign 8.0.21, RSA-PSS certificate is also supported.
<span class='line'>206</span>      * For supported RSA-PSS algorithm name and PSS parameters,
<span class='line'>207</span>      * see {@link X509#getSignatureAlgorithmField}.
<span class='line'>208</span>      * @example
<span class='line'>209</span>      * var x = new X509();
<span class='line'>210</span>      * x.readCertPEM(sCertPEM);
<span class='line'>211</span>      * algName = x.getSignatureAlgorithmField();
<span class='line'>212</span>      */</span><span class="WHIT">
<span class='line'>213</span> </span><span class="WHIT">    </span><span class="NAME">this.getSignatureAlgorithmField</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>214</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyListEx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>215</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getAlgorithmIdentifierName</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>216</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>217</span> 
<span class='line'>218</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>219</span>      * get algorithm name name of AlgorithmIdentifier ASN.1 structure
<span class='line'>220</span>      * @name getAlgorithmIdentifierName
<span class='line'>221</span>      * @memberOf X509#
<span class='line'>222</span>      * @function
<span class='line'>223</span>      * @param {String} hTLV hexadecimal string of AlgorithmIdentifier
<span class='line'>224</span>      * @return {String} algorithm name (ex. SHA1withRSA, SHA256withECDSA, SHA512withRSAandMGF1, SHA1)
<span class='line'>225</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>226</span>      * @description
<span class='line'>227</span>      * This method will get a name of AlgorithmIdentifier.
<span class='line'>228</span>      * &lt;br/>
<span class='line'>229</span>      * @example
<span class='line'>230</span>      * var x = new X509();
<span class='line'>231</span>      * algName = x.getAlgorithmIdentifierName("30...");
<span class='line'>232</span>      */</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">    </span><span class="NAME">this.getAlgorithmIdentifierName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">key</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">_PSSNAME2ASN1TLV</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>235</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">_PSSNAME2ASN1TLV</span><span class="PUNC">[</span><span class="NAME">key</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>236</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">key</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>237</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>238</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_oidname</span><span class="PUNC">(</span><span class="NAME">_getVbyListEx</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>241</span> 
<span class='line'>242</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>243</span>      * get JSON object of issuer field&lt;br/>
<span class='line'>244</span>      * @name getIssuer
<span class='line'>245</span>      * @memberOf X509#
<span class='line'>246</span>      * @function
<span class='line'>247</span>      * @param {boolean} flagCanon flag to conclude canonicalized name (DEFAULT false)
<span class='line'>248</span>      * @param {boolean} flagHex flag to conclude hexadecimal string (DEFAULT false)
<span class='line'>249</span>      * @return {Array} JSON object of issuer field
<span class='line'>250</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>251</span>      * @see X509#getX500Name
<span class='line'>252</span>      *
<span class='line'>253</span>      * @description
<span class='line'>254</span>      * Get a JSON object of an issuer field.
<span class='line'>255</span>      * &lt;br>
<span class='line'>256</span>      * NOTE: From jsrsasign 10.6.0, flagHex and flagCanon has been 
<span class='line'>257</span>      * supported to conclude a canonicalized name for caseIgnoreMatch
<span class='line'>258</span>      * desribed in &lt;a href="https://tools.ietf.org/html/rfc4518">
<span class='line'>259</span>      * RFC 4518&lt;/a>.
<span class='line'>260</span>      *
<span class='line'>261</span>      * @example
<span class='line'>262</span>      * var x = new X509(sCertPEM);
<span class='line'>263</span>      * x.getIssuer() &rarr;
<span class='line'>264</span>      * { array: [[{type:'C',value:'JP',ds:'prn'}],...],
<span class='line'>265</span>      *   str: "/C=JP/..." }
<span class='line'>266</span>      *
<span class='line'>267</span>      * // with flags
<span class='line'>268</span>      * x.getIssuer(true, true) &rarr;
<span class='line'>269</span>      * { array: ...,
<span class='line'>270</span>      *   str: "/C=JP/O=   Test    123   ",
<span class='line'>271</span>      *   canon: "/c=jp/o=test 123",
<span class='line'>272</span>      *   hex: "30..." }
<span class='line'>273</span>      */</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">    </span><span class="NAME">this.getIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">flagCanon</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagHex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getX500Name</span><span class="PUNC">(</span><span class="NAME">this.getIssuerHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagCanon</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>276</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>277</span> 
<span class='line'>278</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>279</span>      * get hexadecimal string of issuer field TLV of certificate.&lt;br/>
<span class='line'>280</span>      * @name getIssuerHex
<span class='line'>281</span>      * @memberOf X509#
<span class='line'>282</span>      * @function
<span class='line'>283</span>      * @return {String} hexadecial string of issuer DN ASN.1
<span class='line'>284</span>      * @example
<span class='line'>285</span>      * var x = new X509();
<span class='line'>286</span>      * x.readCertPEM(sCertPEM);
<span class='line'>287</span>      * var issuer = x.getIssuerHex(); // return string like "3013..."
<span class='line'>288</span>      */</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT">    </span><span class="NAME">this.getIssuerHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.foffset</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>291</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>292</span> 
<span class='line'>293</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>294</span>      * get string of issuer field of certificate.&lt;br/>
<span class='line'>295</span>      * @name getIssuerString
<span class='line'>296</span>      * @memberOf X509#
<span class='line'>297</span>      * @function
<span class='line'>298</span>      * @return {String} issuer DN string
<span class='line'>299</span>      * @see X509#getIssuer
<span class='line'>300</span>      * @example
<span class='line'>301</span>      * var x = new X509();
<span class='line'>302</span>      * x.readCertPEM(sCertPEM);
<span class='line'>303</span>      * var dn1 = x.getIssuerString(); // return string like "/C=US/O=TEST"
<span class='line'>304</span>      * var dn2 = KJUR.asn1.x509.X500Name.compatToLDAP(dn1); // returns "O=TEST, C=US"
<span class='line'>305</span>      */</span><span class="WHIT">
<span class='line'>306</span> </span><span class="WHIT">    </span><span class="NAME">this.getIssuerString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getIssuer</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>308</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">pIssuer.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>309</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>310</span> 
<span class='line'>311</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>312</span>      * get JSON object of subject field&lt;br/>
<span class='line'>313</span>      * @name getSubject
<span class='line'>314</span>      * @memberOf X509#
<span class='line'>315</span>      * @function
<span class='line'>316</span>      * @param {boolean} flagCanon flag to conclude canonicalized name (DEFAULT false)
<span class='line'>317</span>      * @param {boolean} flagHex flag to conclude hexadecimal string (DEFAULT false)
<span class='line'>318</span>      * @return {object} JSON object of subject field
<span class='line'>319</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>320</span>      * @see X509#getX500Name
<span class='line'>321</span>      *
<span class='line'>322</span>      * @description
<span class='line'>323</span>      * Get a JSON object of a subject field.
<span class='line'>324</span>      * &lt;br>
<span class='line'>325</span>      * NOTE: From jsrsasign 10.6.0, flagHex and flagCanon has been 
<span class='line'>326</span>      * supported to conclude a canonicalized name for caseIgnoreMatch
<span class='line'>327</span>      * desribed in &lt;a href="https://tools.ietf.org/html/rfc4518">
<span class='line'>328</span>      * RFC 4518&lt;/a>.
<span class='line'>329</span>      *
<span class='line'>330</span>      * @example
<span class='line'>331</span>      * var x = new X509(sCertPEM);
<span class='line'>332</span>      * x.getSubject() &rarr;
<span class='line'>333</span>      * { array: [[{type:'C',value:'JP',ds:'prn'}],...],
<span class='line'>334</span>      *   str: "/C=JP/..." }
<span class='line'>335</span>      *
<span class='line'>336</span>      * // with flags
<span class='line'>337</span>      * x.getSubject(true, true) &rarr;
<span class='line'>338</span>      * { array: ...,
<span class='line'>339</span>      *   str: "/C=JP/O=   Test    123   ",
<span class='line'>340</span>      *   canon: "/c=jp/o=test 123",
<span class='line'>341</span>      *   hex: "30..." }
<span class='line'>342</span>      */</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT">    </span><span class="NAME">this.getSubject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">flagCanon</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagHex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>344</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getX500Name</span><span class="PUNC">(</span><span class="NAME">this.getSubjectHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagCanon</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>345</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>346</span> 
<span class='line'>347</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>348</span>      * get hexadecimal string of subject field of certificate.&lt;br/>
<span class='line'>349</span>      * @name getSubjectHex
<span class='line'>350</span>      * @memberOf X509#
<span class='line'>351</span>      * @function
<span class='line'>352</span>      * @return {String} hexadecial string of subject DN ASN.1
<span class='line'>353</span>      * @example
<span class='line'>354</span>      * var x = new X509();
<span class='line'>355</span>      * x.readCertPEM(sCertPEM);
<span class='line'>356</span>      * var subject = x.getSubjectHex(); // return string like "3013..."
<span class='line'>357</span>      */</span><span class="WHIT">
<span class='line'>358</span> </span><span class="WHIT">    </span><span class="NAME">this.getSubjectHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>359</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.foffset</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>360</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>361</span> 
<span class='line'>362</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>363</span>      * get string of subject field of certificate.&lt;br/>
<span class='line'>364</span>      * @name getSubjectString
<span class='line'>365</span>      * @memberOf X509#
<span class='line'>366</span>      * @function
<span class='line'>367</span>      * @return {String} subject DN string
<span class='line'>368</span>      * @see X509#getSubject
<span class='line'>369</span>      * @example
<span class='line'>370</span>      * var x = new X509();
<span class='line'>371</span>      * x.readCertPEM(sCertPEM);
<span class='line'>372</span>      * var dn1 = x.getSubjectString(); // return string like "/C=US/O=TEST"
<span class='line'>373</span>      * var dn2 = KJUR.asn1.x509.X500Name.compatToLDAP(dn1); // returns "O=TEST, C=US"
<span class='line'>374</span>      */</span><span class="WHIT">
<span class='line'>375</span> </span><span class="WHIT">    </span><span class="NAME">this.getSubjectString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>376</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pSubject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSubject</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>377</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">pSubject.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>378</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>379</span> 
<span class='line'>380</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>381</span>      * get notBefore field string of certificate.&lt;br/>
<span class='line'>382</span>      * @name getNotBefore
<span class='line'>383</span>      * @memberOf X509#
<span class='line'>384</span>      * @function
<span class='line'>385</span>      * @return {String} not before time value (ex. "151231235959Z")
<span class='line'>386</span>      * @example
<span class='line'>387</span>      * var x = new X509();
<span class='line'>388</span>      * x.readCertPEM(sCertPEM);
<span class='line'>389</span>      * var notBefore = x.getNotBefore(); // return string like "151231235959Z"
<span class='line'>390</span>      */</span><span class="WHIT">
<span class='line'>391</span> </span><span class="WHIT">    </span><span class="NAME">this.getNotBefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>392</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.foffset</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>393</span> </span><span class="WHIT">        </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.replace</span><span class="PUNC">(</span><span class="REGX">/(..)/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"%$1"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>394</span> </span><span class="WHIT">        </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">decodeURIComponent</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>395</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>396</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>397</span> 
<span class='line'>398</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>399</span>      * get notAfter field string of certificate.&lt;br/>
<span class='line'>400</span>      * @name getNotAfter
<span class='line'>401</span>      * @memberOf X509#
<span class='line'>402</span>      * @function
<span class='line'>403</span>      * @return {String} not after time value (ex. "151231235959Z")
<span class='line'>404</span>      * @example
<span class='line'>405</span>      * var x = new X509();
<span class='line'>406</span>      * x.readCertPEM(sCertPEM);
<span class='line'>407</span>      * var notAfter = x.getNotAfter(); // return string like "151231235959Z"
<span class='line'>408</span>      */</span><span class="WHIT">
<span class='line'>409</span> </span><span class="WHIT">    </span><span class="NAME">this.getNotAfter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>410</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.foffset</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>411</span> </span><span class="WHIT">        </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.replace</span><span class="PUNC">(</span><span class="REGX">/(..)/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"%$1"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>412</span> </span><span class="WHIT">        </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">decodeURIComponent</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>413</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>414</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>415</span> 
<span class='line'>416</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>417</span>      * get a hexadecimal string of subjectPublicKeyInfo field.&lt;br/>
<span class='line'>418</span>      * @name getPublicKeyHex
<span class='line'>419</span>      * @memberOf X509#
<span class='line'>420</span>      * @function
<span class='line'>421</span>      * @return {String} ASN.1 SEQUENCE hexadecimal string of subjectPublicKeyInfo field
<span class='line'>422</span>      * @since jsrsasign 7.1.4 x509 1.1.13
<span class='line'>423</span>      * @deprecated since jsrsasign 10.5.7 x509 2.0.13. Please use {@link X509#getSPKI} instead.
<span class='line'>424</span>      *
<span class='line'>425</span>      * @example
<span class='line'>426</span>      * x = new X509(sCertPEM);
<span class='line'>427</span>      * hSPKI = x.getPublicKeyHex(); // return string like "30820122..."
<span class='line'>428</span>      */</span><span class="WHIT">
<span class='line'>429</span> </span><span class="WHIT">    </span><span class="NAME">this.getPublicKeyHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>430</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getSPKI</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>431</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>432</span> 
<span class='line'>433</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>434</span>      * get ASN.1 TLV hexadecimal string of subjectPublicKeyInfo field.&lt;br/>
<span class='line'>435</span>      * @name getSPKI
<span class='line'>436</span>      * @memberOf X509#
<span class='line'>437</span>      * @function
<span class='line'>438</span>      * @return {string} ASN.1 SEQUENCE hexadecimal string of subjectPublicKeyInfo field
<span class='line'>439</span>      * @since jsrsasign 10.5.8 x509 2.0.13
<span class='line'>440</span>      * @see X509#getPublicKeyHex
<span class='line'>441</span>      * @see X509#getSPKIValue
<span class='line'>442</span>      *
<span class='line'>443</span>      * @description
<span class='line'>444</span>      * Get a hexadecimal string of SubjectPublicKeyInfo ASN.1 TLV of the certificate.&lt;br/>
<span class='line'>445</span>      * &lt;pre>
<span class='line'>446</span>      * SubjectPublicKeyInfo  ::=  SEQUENCE  {
<span class='line'>447</span>      *    algorithm         AlgorithmIdentifier,
<span class='line'>448</span>      *    subjectPublicKey  BIT STRING  }
<span class='line'>449</span>      * &lt;/pre>
<span class='line'>450</span>      *
<span class='line'>451</span>      * @example
<span class='line'>452</span>      * x = new X509(sCertPEM);
<span class='line'>453</span>      * hSPKI = x.getSPKI(); // return string like "30820122..."
<span class='line'>454</span>      */</span><span class="WHIT">
<span class='line'>455</span> </span><span class="WHIT">    </span><span class="NAME">this.getSPKI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>456</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.foffset</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>457</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>458</span> 
<span class='line'>459</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>460</span>      * get hexadecimal string of subjectPublicKey of subjectPublicKeyInfo field.&lt;br/>
<span class='line'>461</span>      * @name getSPKIValue
<span class='line'>462</span>      * @memberOf X509#
<span class='line'>463</span>      * @function
<span class='line'>464</span>      * @return {string} ASN.1 hexadecimal string of subjectPublicKey
<span class='line'>465</span>      * @since jsrsasign 10.5.8 x509 2.0.13
<span class='line'>466</span>      * @see X509#getSPKI
<span class='line'>467</span>      *
<span class='line'>468</span>      * @description
<span class='line'>469</span>      * Get a hexadecimal string of subjectPublicKey ASN.1 value of SubjectPublicKeyInfo 
<span class='line'>470</span>      * of the certificate without unusedbit "00".
<span class='line'>471</span>      * The "subjectPublicKey" is encapsulated by BIT STRING.
<span class='line'>472</span>      * This method returns BIT STRING value without unusedbits.
<span class='line'>473</span>      * &lt;br/>
<span class='line'>474</span>      * &lt;pre>
<span class='line'>475</span>      * SubjectPublicKeyInfo  ::=  SEQUENCE  {
<span class='line'>476</span>      *    algorithm         AlgorithmIdentifier,
<span class='line'>477</span>      *    subjectPublicKey  BIT STRING  }
<span class='line'>478</span>      * &lt;/pre>
<span class='line'>479</span>      *
<span class='line'>480</span>      * @example
<span class='line'>481</span>      * x = new X509(sCertPEM);
<span class='line'>482</span>      * hSPKIValue = x.getSPKIValue(); // without BIT STRING Encapusulation.
<span class='line'>483</span>      */</span><span class="WHIT">
<span class='line'>484</span> </span><span class="WHIT">    </span><span class="NAME">this.getSPKIValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hSPKI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSPKI</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>486</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hSPKI</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>487</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hSPKI</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"03"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// true: remove unused bit</span><span class="WHIT">
<span class='line'>488</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>489</span> 
<span class='line'>490</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>491</span>      * get a string index of subjectPublicKeyInfo field for hexadecimal string certificate.&lt;br/>
<span class='line'>492</span>      * @name getPublicKeyIdx
<span class='line'>493</span>      * @memberOf X509#
<span class='line'>494</span>      * @function
<span class='line'>495</span>      * @return {Number} string index of subjectPublicKeyInfo field for hexadecimal string certificate.
<span class='line'>496</span>      * @since jsrsasign 7.1.4 x509 1.1.13
<span class='line'>497</span>      * @example
<span class='line'>498</span>      * x = new X509();
<span class='line'>499</span>      * x.readCertPEM(sCertPEM);
<span class='line'>500</span>      * idx = x.getPublicKeyIdx(); // return string index in x.hex parameter
<span class='line'>501</span>      */</span><span class="WHIT">
<span class='line'>502</span> </span><span class="WHIT">    </span><span class="NAME">this.getPublicKeyIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>503</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">6</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.foffset</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>504</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>505</span> 
<span class='line'>506</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>507</span>      * get a string index of contents of subjectPublicKeyInfo BITSTRING value from hexadecimal certificate&lt;br/>
<span class='line'>508</span>      * @name getPublicKeyContentIdx
<span class='line'>509</span>      * @memberOf X509#
<span class='line'>510</span>      * @function
<span class='line'>511</span>      * @return {Integer} string index of key contents
<span class='line'>512</span>      * @since jsrsasign 8.0.0 x509 1.2.0
<span class='line'>513</span>      * @example
<span class='line'>514</span>      * x = new X509();
<span class='line'>515</span>      * x.readCertPEM(sCertPEM);
<span class='line'>516</span>      * idx = x.getPublicKeyContentIdx(); // return string index in x.hex parameter
<span class='line'>517</span>      */</span><span class="WHIT">
<span class='line'>518</span> </span><span class="WHIT">    </span><span class="COMM">// NOTE: Without BITSTRING encapsulation.</span><span class="WHIT">
<span class='line'>519</span> </span><span class="WHIT">    </span><span class="NAME">this.getPublicKeyContentIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>520</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getPublicKeyIdx</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>521</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>522</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>523</span> 
<span class='line'>524</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>525</span>      * get a RSAKey/ECDSA/DSA public key object of subjectPublicKeyInfo field.&lt;br/>
<span class='line'>526</span>      * @name getPublicKey
<span class='line'>527</span>      * @memberOf X509#
<span class='line'>528</span>      * @function
<span class='line'>529</span>      * @return {Object} RSAKey/ECDSA/DSA public key object of subjectPublicKeyInfo field
<span class='line'>530</span>      * @since jsrsasign 7.1.4 x509 1.1.13
<span class='line'>531</span>      * @example
<span class='line'>532</span>      * x = new X509();
<span class='line'>533</span>      * x.readCertPEM(sCertPEM);
<span class='line'>534</span>      * pubkey= x.getPublicKey();
<span class='line'>535</span>      */</span><span class="WHIT">
<span class='line'>536</span> </span><span class="WHIT">    </span><span class="NAME">this.getPublicKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>537</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">KEYUTIL.getKey</span><span class="PUNC">(</span><span class="NAME">this.getPublicKeyHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"pkcs8pub"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>538</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>539</span> 
<span class='line'>540</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>541</span>      * get signature algorithm name from hexadecimal certificate data
<span class='line'>542</span>      * @name getSignatureAlgorithmName
<span class='line'>543</span>      * @memberOf X509#
<span class='line'>544</span>      * @function
<span class='line'>545</span>      * @return {String} signature algorithm name (ex. SHA1withRSA, SHA256withECDSA)
<span class='line'>546</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>547</span>      * @see X509#getAlgorithmIdentifierName
<span class='line'>548</span>      * @description
<span class='line'>549</span>      * This method will get signature algorithm name of certificate:
<span class='line'>550</span>      * @example
<span class='line'>551</span>      * var x = new X509();
<span class='line'>552</span>      * x.readCertPEM(sCertPEM);
<span class='line'>553</span>      * x.getSignatureAlgorithmName() &rarr; "SHA256withRSA"
<span class='line'>554</span>      */</span><span class="WHIT">
<span class='line'>555</span> </span><span class="WHIT">    </span><span class="NAME">this.getSignatureAlgorithmName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>556</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>557</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.getAlgorithmIdentifierName</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>558</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>559</span> 
<span class='line'>560</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>561</span>      * get signature value as hexadecimal string&lt;br/>
<span class='line'>562</span>      * @name getSignatureValueHex
<span class='line'>563</span>      * @memberOf X509#
<span class='line'>564</span>      * @function
<span class='line'>565</span>      * @return {String} signature value hexadecimal string without BitString unused bits
<span class='line'>566</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>567</span>      *
<span class='line'>568</span>      * @description
<span class='line'>569</span>      * This method will get signature value of certificate:
<span class='line'>570</span>      *
<span class='line'>571</span>      * @example
<span class='line'>572</span>      * var x = new X509();
<span class='line'>573</span>      * x.readCertPEM(sCertPEM);
<span class='line'>574</span>      * x.getSignatureValueHex() &rarr "8a4c47913..."
<span class='line'>575</span>      */</span><span class="WHIT">
<span class='line'>576</span> </span><span class="WHIT">    </span><span class="NAME">this.getSignatureValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>577</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"03"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>578</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>579</span> 
<span class='line'>580</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>581</span>      * verifies signature value by public key&lt;br/>
<span class='line'>582</span>      * @name verifySignature
<span class='line'>583</span>      * @memberOf X509#
<span class='line'>584</span>      * @function
<span class='line'>585</span>      * @param {Object} pubKey public key object
<span class='line'>586</span>      * @return {Boolean} true if signature value is valid otherwise false
<span class='line'>587</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>588</span>      *
<span class='line'>589</span>      * @description
<span class='line'>590</span>      * This method verifies signature value of hexadecimal string of 
<span class='line'>591</span>      * X.509 certificate by specified public key object.
<span class='line'>592</span>      * The signature algorithm used to verify will refer
<span class='line'>593</span>      * signatureAlgorithm field. (See {@link X509#getSignatureAlgorithmField})
<span class='line'>594</span>      * RSA-PSS signature algorithms (SHA{,256,384,512}withRSAandMGF1)
<span class='line'>595</span>      * are available.
<span class='line'>596</span>      *
<span class='line'>597</span>      * @example
<span class='line'>598</span>      * pubKey = KEYUTIL.getKey(pemPublicKey); // or certificate
<span class='line'>599</span>      * x = new X509();
<span class='line'>600</span>      * x.readCertPEM(pemCert);
<span class='line'>601</span>      * x.verifySignature(pubKey) &rarr; true, false or raising exception
<span class='line'>602</span>      */</span><span class="WHIT">
<span class='line'>603</span> </span><span class="WHIT">    </span><span class="NAME">this.verifySignature</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">pubKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>604</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">algName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureAlgorithmField</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>605</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hSigVal</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureValueHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>606</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTbsCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>607</span> </span><span class="WHIT">	
<span class='line'>608</span> 	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.crypto.Signature</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">alg</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">algName</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>609</span> </span><span class="WHIT">	</span><span class="NAME">sig.init</span><span class="PUNC">(</span><span class="NAME">pubKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>610</span> </span><span class="WHIT">	</span><span class="NAME">sig.updateHex</span><span class="PUNC">(</span><span class="NAME">hTbsCert</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>611</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">sig.verify</span><span class="PUNC">(</span><span class="NAME">hSigVal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>612</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>613</span> 
<span class='line'>614</span> </span><span class="WHIT">    </span><span class="COMM">// ===== parse extension ======================================</span><span class="WHIT">
<span class='line'>615</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>616</span>      * set array of X.509v3 and CSR extesion information such as extension OID, criticality and value index. (DEPRECATED)&lt;br/>
<span class='line'>617</span>      * @name parseExt
<span class='line'>618</span>      * @memberOf X509#
<span class='line'>619</span>      * @function
<span class='line'>620</span>      * @param {String} hCSR - PEM string of certificate signing requrest(CSR) (OPTION)
<span class='line'>621</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>622</span>      * @deprecated jsrsasign 9.1.1 x509 2.0.1
<span class='line'>623</span>      *
<span class='line'>624</span>      * @description
<span class='line'>625</span>      * This method will set an array of X.509v3 extension information having 
<span class='line'>626</span>      * following parameters:
<span class='line'>627</span>      * &lt;ul>
<span class='line'>628</span>      * &lt;li>oid - extension OID (ex. 2.5.29.19)&lt;/li>
<span class='line'>629</span>      * &lt;li>critical - true or false&lt;/li>
<span class='line'>630</span>      * &lt;li>vidx - string index for extension value&lt;/li>
<span class='line'>631</span>      * &lt;br/>
<span class='line'>632</span>      * When you want to parse extensionRequest of CSR,
<span class='line'>633</span>      * argument 'hCSR' shall be specified.
<span class='line'>634</span>      * &lt;br/>
<span class='line'>635</span>      * NOTE: CSR is supported from jsrsasign 8.0.20 x509 1.1.22.
<span class='line'>636</span>      * &lt;br/>
<span class='line'>637</span>      * This method and X509.aExtInfo property
<span class='line'>638</span>      * have been *deprecated* since jsrsasign 9.1.1.
<span class='line'>639</span>      * All extension parser method such as X509.getExt* shall be
<span class='line'>640</span>      * call with argument "hExtV" and "critical" explicitly.
<span class='line'>641</span>      *
<span class='line'>642</span>      * @example
<span class='line'>643</span>      * x = new X509();
<span class='line'>644</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>645</span>      *
<span class='line'>646</span>      * x.aExtInfo &rarr;
<span class='line'>647</span>      * [ { oid: "2.5.29,19", critical: true, vidx: 2504 }, ... ]
<span class='line'>648</span>      *
<span class='line'>649</span>      * // to parse CSR
<span class='line'>650</span>      * X = new X509()
<span class='line'>651</span>      * x.parseExt("-----BEGIN CERTIFICATE REQUEST-----...");
<span class='line'>652</span>      * x.aExtInfo &rarr;
<span class='line'>653</span>      * [ { oid: "2.5.29,19", critical: true, vidx: 2504 }, ... ]
<span class='line'>654</span>      */</span><span class="WHIT">
<span class='line'>655</span> </span><span class="WHIT">    </span><span class="NAME">this.parseExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hCSR</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>656</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">iExtSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aExtIdx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>657</span> 
<span class='line'>658</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hCSR</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>659</span> </span><span class="WHIT">	    </span><span class="NAME">h</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.hex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>660</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.version</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>661</span> </span><span class="WHIT">	    </span><span class="NAME">iExtSeq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">7</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>662</span> </span><span class="WHIT">	    </span><span class="NAME">aExtIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">iExtSeq</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>663</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>664</span> </span><span class="WHIT">	    </span><span class="NAME">h</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pemtohex</span><span class="PUNC">(</span><span class="NAME">hCSR</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>665</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>666</span> 
<span class='line'>667</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"2a864886f70d01090e"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>668</span> </span><span class="WHIT">		</span><span class="NAME">this.aExtInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>669</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>670</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>671</span> 
<span class='line'>672</span> </span><span class="WHIT">	    </span><span class="NAME">iExtSeq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>673</span> </span><span class="WHIT">	    </span><span class="NAME">aExtIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">iExtSeq</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>674</span> 
<span class='line'>675</span> </span><span class="WHIT">	    </span><span class="NAME">this.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>676</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>677</span> </span><span class="WHIT">	    
<span class='line'>678</span> 	</span><span class="NAME">this.aExtInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>679</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aExtIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>680</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>681</span> </span><span class="WHIT">	    </span><span class="NAME">item.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>682</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aExtIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>683</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">offset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>684</span> 
<span class='line'>685</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a.length</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>686</span> </span><span class="WHIT">		</span><span class="NAME">item.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>687</span> </span><span class="WHIT">		</span><span class="NAME">offset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>688</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>689</span> 
<span class='line'>690</span> </span><span class="WHIT">	    </span><span class="NAME">item.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.hextooidstr</span><span class="PUNC">(</span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aExtIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>691</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">octidx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aExtIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">offset</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>692</span> </span><span class="WHIT">	    </span><span class="NAME">item.vidx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVidx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">octidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>693</span> </span><span class="WHIT">	    </span><span class="NAME">this.aExtInfo.push</span><span class="PUNC">(</span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>694</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>695</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>696</span> 
<span class='line'>697</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>698</span>      * get a X.509v3 extesion information such as extension OID, criticality and value index for specified oid or name.&lt;br/>
<span class='line'>699</span>      * @name getExtInfo
<span class='line'>700</span>      * @memberOf X509#
<span class='line'>701</span>      * @function
<span class='line'>702</span>      * @param {String} oidOrName X.509 extension oid or name (ex. keyUsage or 2.5.29.19)
<span class='line'>703</span>      * @return X.509 extension information such as extension OID or value indx (see {@link X509#parseExt})
<span class='line'>704</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>705</span>      * @description
<span class='line'>706</span>      * This method will get an X.509v3 extension information JSON object
<span class='line'>707</span>      * having extension OID, criticality and value idx for specified
<span class='line'>708</span>      * extension OID or name.
<span class='line'>709</span>      * If there is no such extension, this returns undefined.
<span class='line'>710</span>      * @example
<span class='line'>711</span>      * x = new X509();
<span class='line'>712</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>713</span>      *
<span class='line'>714</span>      * x.getExtInfo("keyUsage") &rarr; { oid: "2.5.29.15", critical: true, vidx: 1714 }
<span class='line'>715</span>      * x.getExtInfo("unknownExt") &rarr; undefined
<span class='line'>716</span>      */</span><span class="WHIT">
<span class='line'>717</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oidOrName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>718</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.aExtInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>719</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oidOrName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>720</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">oidOrName.match</span><span class="PUNC">(</span><span class="REGX">/^[0-9.]+$/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>721</span> </span><span class="WHIT">	    </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.name2oid</span><span class="PUNC">(</span><span class="NAME">oidOrName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>722</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>723</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>724</span> 
<span class='line'>725</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>726</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>727</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>728</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>729</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>730</span> 
<span class='line'>731</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>732</span>      * get extension value and critical flag value&lt;br/>
<span class='line'>733</span>      * @name getCriticalExtV
<span class='line'>734</span>      * @memberOf X509#
<span class='line'>735</span>      * @function
<span class='line'>736</span>      * @param {string} extname name string of the extension
<span class='line'>737</span>      * @param {string} hExtV hexadecimal string of extension
<span class='line'>738</span>      * @param {boolean} critical flag
<span class='line'>739</span>      * @return {Array} extension value hex and critical flag
<span class='line'>740</span>      * @since jsrsasign 10.6.1 x509 2.1.1
<span class='line'>741</span>      *
<span class='line'>742</span>      * @description
<span class='line'>743</span>      * This method is an utility method for all getExt* of extensions.
<span class='line'>744</span>      *
<span class='line'>745</span>      * @example
<span class='line'>746</span>      * x = new X509(sCertPEM);
<span class='line'>747</span>      * x.getCriticalExtV("inhibitAnyPolicy") &rarr ["020103", true] // get from X509 object
<span class='line'>748</span>      * x.getCriticalExtV("inhibitAnyPolicy",
<span class='line'>749</span>      *                   "020104",
<span class='line'>750</span>      *                   true) &rarr ["020104", true] // by argument of method.
<span class='line'>751</span>      */</span><span class="WHIT">
<span class='line'>752</span> </span><span class="WHIT">    </span><span class="NAME">this.getCriticalExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">extname</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>753</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>754</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="NAME">extname</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>755</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>756</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>757</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>758</span> 
<span class='line'>759</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>760</span>      * get BasicConstraints extension value as object in the certificate
<span class='line'>761</span>      * @name getExtBasicConstraints
<span class='line'>762</span>      * @memberOf X509#
<span class='line'>763</span>      * @function
<span class='line'>764</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>765</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>766</span>      * @return {Array} JSON object of BasicConstraints parameter or undefined
<span class='line'>767</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>768</span>      * @see KJUR.asn1.x509.BasicConstraints
<span class='line'>769</span>      * @description
<span class='line'>770</span>      * This method will get basic constraints extension value as object with following paramters.
<span class='line'>771</span>      * &lt;ul>
<span class='line'>772</span>      * &lt;li>{Boolean}cA - CA flag whether CA or not&lt;/li>
<span class='line'>773</span>      * &lt;li>{Integer}pathLen - maximum intermediate certificate length&lt;/li>
<span class='line'>774</span>      * &lt;li>{Boolean}critical - critical flag&lt;/li>
<span class='line'>775</span>      * &lt;/ul>
<span class='line'>776</span>      * There are use cases for return values:
<span class='line'>777</span>      * &lt;ul>
<span class='line'>778</span>      * &lt;li>{cA:true,pathLen:3,critical:true} - cA flag is true and pathLen is 3&lt;/li>
<span class='line'>779</span>      * &lt;li>{cA:true,critical:true} - cA flag is true and no pathLen&lt;/li>
<span class='line'>780</span>      * &lt;li>{} - basic constraints has no value in case of end entity certificate&lt;/li>
<span class='line'>781</span>      * &lt;li>undefined - there is no basic constraints extension&lt;/li>
<span class='line'>782</span>      * &lt;/ul>
<span class='line'>783</span>      * @example
<span class='line'>784</span>      * x = new X509();
<span class='line'>785</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>786</span>      * x.getExtBasicConstraints() &rarr; {cA:true,pathLen:3,critical:true}
<span class='line'>787</span>      */</span><span class="WHIT">
<span class='line'>788</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtBasicConstraints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>789</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>790</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"basicConstraints"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>791</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>792</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>793</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>794</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>795</span> 
<span class='line'>796</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"basicConstraints"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>797</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>798</span> 
<span class='line'>799</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'3000'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>800</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'30030101ff'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>801</span> </span><span class="WHIT">	    </span><span class="NAME">result.cA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>802</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>803</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>804</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">12</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'30060101ff02'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>805</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pathLexHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>806</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pathLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">pathLexHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>807</span> </span><span class="WHIT">	    </span><span class="NAME">result.cA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>808</span> </span><span class="WHIT">	    </span><span class="NAME">result.pathLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pathLen</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>809</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>810</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>811</span> </span><span class="WHIT">	</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"hExtV parse error: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>812</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>813</span> 
<span class='line'>814</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>815</span>      * get NameConstraints extension value as object in the certificate&lt;br/>
<span class='line'>816</span>      * @name getExtNameConstraints
<span class='line'>817</span>      * @memberOf X509#
<span class='line'>818</span>      * @function
<span class='line'>819</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>820</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>821</span>      * @return {Object} JSON object of NamConstraints parameter or undefined
<span class='line'>822</span>      * @since jsrsasign 10.5.16 x509 2.0.16
<span class='line'>823</span>      * @see KJUR.asn1.x509.NameConstraints
<span class='line'>824</span>      * @see KJUR.asn1.x509.GeneralSubtree
<span class='line'>825</span>      * @see KJUR.asn1.x509.GeneralName
<span class='line'>826</span>      * @see X509#getGeneralSubtree
<span class='line'>827</span>      * @see X509#getGeneralName
<span class='line'>828</span>      *
<span class='line'>829</span>      * @description
<span class='line'>830</span>      * This method will get name constraints extension value as object with following paramters.
<span class='line'>831</span>      * &lt;ul>
<span class='line'>832</span>      * &lt;li>{Array}permit - array of {@link KJUR.asn1.x509.GeneralSubtree} parameter&lt;/li>
<span class='line'>833</span>      * &lt;li>{Array}exclude - array of {@link KJUR.asn1.x509.GeneralSubtree} parameter&lt;/li>
<span class='line'>834</span>      * &lt;li>{Boolean}critical - critical flag&lt;/li>
<span class='line'>835</span>      * &lt;/ul>
<span class='line'>836</span>      *
<span class='line'>837</span>      * @example
<span class='line'>838</span>      * x = new X509(sCertPEM);
<span class='line'>839</span>      * x.getExtNameConstraints() &rarr; {
<span class='line'>840</span>      *   critical: true,
<span class='line'>841</span>      *   permit: [{dns: 'example.com'},{rfc822: 'john@example.com'}],
<span class='line'>842</span>      *   exclude: [{dn: {...X500Name parameter...}}]
<span class='line'>843</span>      * }
<span class='line'>844</span>      */</span><span class="WHIT">
<span class='line'>845</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtNameConstraints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>846</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getCriticalExtV</span><span class="PUNC">(</span><span class="STRN">"nameConstraints"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>847</span> </span><span class="WHIT">	</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>848</span> </span><span class="WHIT">	</span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>849</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>850</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"nameConstraints"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>851</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>852</span> 
<span class='line'>853</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>854</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>855</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>856</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>857</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdx2.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>858</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hSub</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx2</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>859</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralSubtree</span><span class="PUNC">(</span><span class="NAME">hSub</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>860</span> </span><span class="WHIT">		</span><span class="NAME">aList.push</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>861</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>862</span> 
<span class='line'>863</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hExtV.substr</span><span class="PUNC">(</span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> 
<span class='line'>864</span> 	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>865</span> </span><span class="WHIT">		</span><span class="NAME">result.permit</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>866</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a1"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>867</span> </span><span class="WHIT">		</span><span class="NAME">result.exclude</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>868</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>869</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>870</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>871</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>872</span> 
<span class='line'>873</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>874</span>      * get GeneralSubtree ASN.1 structure parameter as JSON object&lt;br/>
<span class='line'>875</span>      * @name getGeneralSubtree
<span class='line'>876</span>      * @memberOf X509#
<span class='line'>877</span>      * @function
<span class='line'>878</span>      * @param {String} h hexadecimal string of GeneralSubtree
<span class='line'>879</span>      * @return {Object} JSON object of GeneralSubtree parameters or undefined
<span class='line'>880</span>      * @since jsrsasign 10.5.16 x509 2.0.16
<span class='line'>881</span>      * @see KJUR.asn1.x509.GeneralSubtree
<span class='line'>882</span>      * @see KJUR.asn1.x509.GeneralName
<span class='line'>883</span>      * @see X509#getExtNameConstraints
<span class='line'>884</span>      * @see X509#getGeneralName
<span class='line'>885</span>      *
<span class='line'>886</span>      * @description
<span class='line'>887</span>      * This method will get GeneralSubtree parameters defined in
<span class='line'>888</span>      * &lt;a href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10">
<span class='line'>889</span>      * RFC 5280 4.2.1.10&lt;/a>.
<span class='line'>890</span>      * &lt;pre>
<span class='line'>891</span>      * GeneralSubtree ::= SEQUENCE {
<span class='line'>892</span>      *      base                    GeneralName,
<span class='line'>893</span>      *      minimum         [0]     BaseDistance DEFAULT 0,
<span class='line'>894</span>      *      maximum         [1]     BaseDistance OPTIONAL }
<span class='line'>895</span>      * BaseDistance ::= INTEGER (0..MAX)
<span class='line'>896</span>      * &lt;/pre>
<span class='line'>897</span>      * Result of this method can be passed to
<span class='line'>898</span>      * {@link KJUR.asn1.x509.GeneralSubtree} constructor.
<span class='line'>899</span>      * 
<span class='line'>900</span>      * @example
<span class='line'>901</span>      * x = new X509(sPEM);
<span class='line'>902</span>      * x.getGeneralSubtree("30...") &rarr; { dn: ...X500NameObject..., min: 1, max: 3 }
<span class='line'>903</span>      * x.getGeneralSubtree("30...") &rarr; { dns: ".example.com" }
<span class='line'>904</span>      */</span><span class="WHIT">
<span class='line'>905</span> </span><span class="WHIT">    </span><span class="NAME">this.getGeneralSubtree</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>906</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>907</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>908</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">len</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"wrong num elements"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>909</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralName</span><span class="PUNC">(</span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>910</span> 
<span class='line'>911</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">len</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>912</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">h.substr</span><span class="PUNC">(</span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>913</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>914</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">minmaxValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">hV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>915</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"80"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.min</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minmaxValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>916</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"81"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.max</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">minmaxValue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>917</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>918</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>919</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>920</span> 
<span class='line'>921</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>922</span>      * get KeyUsage extension value as JSON object
<span class='line'>923</span>      * @memberOf X509#
<span class='line'>924</span>      * @function
<span class='line'>925</span>      * @name getExtKeyUsage
<span class='line'>926</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>927</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>928</span>      * @return {Array} JSON object of KeyUsage parameter or undefined
<span class='line'>929</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>930</span>      * @see KJUR.asn1.x509.KeyUsage
<span class='line'>931</span>      * @see X509#getExtKeyUsageString
<span class='line'>932</span>      * @description
<span class='line'>933</span>      * This method parse keyUsage extension. When arguments are
<span class='line'>934</span>      * not specified, its extension in X509 object will be parsed.
<span class='line'>935</span>      * Result of this method can be passed to 
<span class='line'>936</span>      * {@link KJUR.asn1.x509.KeyUsage} constructor.
<span class='line'>937</span>      * &lt;br>
<span class='line'>938</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>939</span>      * will be generated from them.
<span class='line'>940</span>      * &lt;pre>
<span class='line'>941</span>      * id-ce-keyUsage OBJECT IDENTIFIER ::=  { id-ce 15 }
<span class='line'>942</span>      * KeyUsage ::= BIT STRING {
<span class='line'>943</span>      *      digitalSignature        (0),
<span class='line'>944</span>      *      nonRepudiation          (1),
<span class='line'>945</span>      *      keyEncipherment         (2),
<span class='line'>946</span>      *      dataEncipherment        (3),
<span class='line'>947</span>      *      keyAgreement            (4),
<span class='line'>948</span>      *      keyCertSign             (5),
<span class='line'>949</span>      *      cRLSign                 (6),
<span class='line'>950</span>      *      encipherOnly            (7),
<span class='line'>951</span>      *      decipherOnly            (8) }     
<span class='line'>952</span>      * &lt;/pre>
<span class='line'>953</span>      * @example
<span class='line'>954</span>      * x = new X509();
<span class='line'>955</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>956</span>      * x.getExtKeyUsage() &rarr;
<span class='line'>957</span>      * {
<span class='line'>958</span>      *   critial: true,
<span class='line'>959</span>      *   names: ["digitalSignature", "decipherOnly"]
<span class='line'>960</span>      * }
<span class='line'>961</span>      *
<span class='line'>962</span>      * x = new X509();
<span class='line'>963</span>      * x.getExtKeyUsage("306230...") 
<span class='line'>964</span>      * x.getExtKeyUsage("306230...", true) 
<span class='line'>965</span>      */</span><span class="WHIT">
<span class='line'>966</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtKeyUsage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>967</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getCriticalExtV</span><span class="PUNC">(</span><span class="STRN">"keyUsage"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>968</span> </span><span class="WHIT">	</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>969</span> </span><span class="WHIT">	</span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>970</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>971</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"keyUsage"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>972</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>973</span> 
<span class='line'>974</span> </span><span class="WHIT">	</span><span class="NAME">result.names</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtKeyUsageString</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>975</span> 
<span class='line'>976</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>977</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>978</span> 
<span class='line'>979</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>980</span>      * get KeyUsage extension value as binary string in the certificate&lt;br/>
<span class='line'>981</span>      * @name getExtKeyUsageBin
<span class='line'>982</span>      * @memberOf X509#
<span class='line'>983</span>      * @function
<span class='line'>984</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>985</span>      * @return {String} binary string of key usage bits (ex. '101')
<span class='line'>986</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>987</span>      * @see X509#getExtKeyUsage
<span class='line'>988</span>      * @description
<span class='line'>989</span>      * This method will get key usage extension value
<span class='line'>990</span>      * as binary string such like '101'.
<span class='line'>991</span>      * Key usage bits definition is in the RFC 5280.
<span class='line'>992</span>      * If there is no key usage extension in the certificate,
<span class='line'>993</span>      * it returns empty string (i.e. '').
<span class='line'>994</span>      * &lt;br/>
<span class='line'>995</span>      * NOTE: argument 'hExtV' supported since jsrsasign 9.0.0 x509 2.0.0.
<span class='line'>996</span>      * @example
<span class='line'>997</span>      * x = new X509();
<span class='line'>998</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>999</span>      * x.getExtKeyUsageBin() &rarr; '101'
<span class='line'>1000</span>      * // 1 - digitalSignature
<span class='line'>1001</span>      * // 0 - nonRepudiation
<span class='line'>1002</span>      * // 1 - keyEncipherment
<span class='line'>1003</span>      */</span><span class="WHIT">
<span class='line'>1004</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtKeyUsageBin</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1005</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1006</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"keyUsage"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1007</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1008</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1009</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1010</span> </span><span class="WHIT">	
<span class='line'>1011</span> 	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV.length</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">hExtV.length</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>1012</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed key usage value: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1013</span> 
<span class='line'>1014</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"000000000000000"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">hExtV.substr</span><span class="PUNC">(</span><span class="NUMB">6</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">toString</span><span class="PUNC">(</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1015</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.slice</span><span class="PUNC">(</span><span class="PUNC">-</span><span class="NUMB">8</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1016</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.slice</span><span class="PUNC">(</span><span class="PUNC">-</span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1017</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.replace</span><span class="PUNC">(</span><span class="REGX">/0+$/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1018</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'0'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1019</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1020</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1021</span> 
<span class='line'>1022</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1023</span>      * get KeyUsage extension value as names in the certificate&lt;br/>
<span class='line'>1024</span>      * @name getExtKeyUsageString
<span class='line'>1025</span>      * @memberOf X509#
<span class='line'>1026</span>      * @function
<span class='line'>1027</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1028</span>      * @return {String} comma separated string of key usage
<span class='line'>1029</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1030</span>      * @see X509#getExtKeyUsage
<span class='line'>1031</span>      * @description
<span class='line'>1032</span>      * This method will get key usage extension value
<span class='line'>1033</span>      * as comma separated string of usage names.
<span class='line'>1034</span>      * If there is no key usage extension in the certificate,
<span class='line'>1035</span>      * it returns empty string (i.e. '').
<span class='line'>1036</span>      * &lt;br/>
<span class='line'>1037</span>      * NOTE: argument 'hExtV' supported since jsrsasign 9.0.0 x509 2.0.0.
<span class='line'>1038</span>      * @example
<span class='line'>1039</span>      * x = new X509();
<span class='line'>1040</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1041</span>      * x.getExtKeyUsageString() &rarr; "digitalSignature,keyEncipherment"
<span class='line'>1042</span>      */</span><span class="WHIT">
<span class='line'>1043</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtKeyUsageString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1044</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bKeyUsage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtKeyUsageBin</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1045</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1046</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">bKeyUsage.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1047</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">bKeyUsage.substr</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"1"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">X509.KEYUSAGE_NAME</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1048</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1049</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a.join</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1050</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1051</span> 
<span class='line'>1052</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1053</span>      * get subjectKeyIdentifier value as hexadecimal string in the certificate&lt;br/>
<span class='line'>1054</span>      * @name getExtSubjectKeyIdentifier
<span class='line'>1055</span>      * @memberOf X509#
<span class='line'>1056</span>      * @function
<span class='line'>1057</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1058</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1059</span>      * @return {Array} JSON object of SubjectKeyIdentifier parameter or undefined
<span class='line'>1060</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1061</span>      * @description
<span class='line'>1062</span>      * This method will get 
<span class='line'>1063</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.2">
<span class='line'>1064</span>      * SubjectKeyIdentifier extension&lt;/a> value as JSON object.
<span class='line'>1065</span>      * &lt;br>
<span class='line'>1066</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>1067</span>      * will be generated from them.
<span class='line'>1068</span>      * If there is no such extension in the certificate, it returns undefined.
<span class='line'>1069</span>      * &lt;br>
<span class='line'>1070</span>      * Result of this method can be passed to 
<span class='line'>1071</span>      * {@link KJUR.asn1.x509.SubjectKeyIdentifier} constructor.
<span class='line'>1072</span>      * &lt;pre>
<span class='line'>1073</span>      * id-ce-subjectKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 14 }
<span class='line'>1074</span>      * SubjectKeyIdentifier ::= KeyIdentifier
<span class='line'>1075</span>      * &lt;/pre>
<span class='line'>1076</span>      * &lt;br>
<span class='line'>1077</span>      * CAUTION:
<span class='line'>1078</span>      * Returned JSON value format have been changed without 
<span class='line'>1079</span>      * backward compatibility since jsrsasign 9.0.0 x509 2.0.0.
<span class='line'>1080</span>      *
<span class='line'>1081</span>      * @example
<span class='line'>1082</span>      * x = new X509();
<span class='line'>1083</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1084</span>      * x.getExtSubjectKeyIdentifier() &rarr; 
<span class='line'>1085</span>      * { kid: {hex: "1b3347ab..."}, critical: true };
<span class='line'>1086</span>      */</span><span class="WHIT">
<span class='line'>1087</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtSubjectKeyIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1088</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1089</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"subjectKeyIdentifier"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1090</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1091</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1092</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1093</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1094</span> 
<span class='line'>1095</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"subjectKeyIdentifier"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1096</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1097</span> 
<span class='line'>1098</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hKID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1099</span> </span><span class="WHIT">	</span><span class="NAME">result.kid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hKID</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1100</span> 
<span class='line'>1101</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1102</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1103</span> 
<span class='line'>1104</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1105</span>      * get authorityKeyIdentifier value as JSON object in the certificate&lt;br/>
<span class='line'>1106</span>      * @name getExtAuthorityKeyIdentifier
<span class='line'>1107</span>      * @memberOf X509#
<span class='line'>1108</span>      * @function
<span class='line'>1109</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1110</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1111</span>      * @return {Array} JSON object of AuthorityKeyIdentifier parameter or undefined
<span class='line'>1112</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1113</span>      * @see KJUR.asn1.x509.AuthorityKeyIdentifier
<span class='line'>1114</span>      * @description
<span class='line'>1115</span>      * This method will get 
<span class='line'>1116</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.1">
<span class='line'>1117</span>      * AuthorityKeyIdentifier extension&lt;/a> value as JSON object.
<span class='line'>1118</span>      * &lt;br>
<span class='line'>1119</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>1120</span>      * will be generated from them.
<span class='line'>1121</span>      * If there is no such extension in the certificate, it returns undefined.
<span class='line'>1122</span>      * &lt;br/>
<span class='line'>1123</span>      * Result of this method can be passed to 
<span class='line'>1124</span>      * {@link KJUR.asn1.x509.AuthorityKeyIdentifier} constructor.
<span class='line'>1125</span>      * &lt;pre>
<span class='line'>1126</span>      *    id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 35 }
<span class='line'>1127</span>      *    AuthorityKeyIdentifier ::= SEQUENCE {
<span class='line'>1128</span>      *       keyIdentifier             [0] KeyIdentifier           OPTIONAL,
<span class='line'>1129</span>      *       authorityCertIssuer       [1] GeneralNames            OPTIONAL,
<span class='line'>1130</span>      *       authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL  }
<span class='line'>1131</span>      *    KeyIdentifier ::= OCTET STRING
<span class='line'>1132</span>      * &lt;/pre>
<span class='line'>1133</span>      * Constructor may have following parameters:
<span class='line'>1134</span>      * &lt;ul>
<span class='line'>1135</span>      * &lt;li>{Array}kid - JSON object of {@link KJUR.asn1.DEROctetString} parameters&lt;/li>
<span class='line'>1136</span>      * &lt;li>{Array}issuer - JSON object of {@link KJUR.asn1.x509.X500Name} parameters&lt;/li>
<span class='line'>1137</span>      * &lt;li>{Array}sn - JSON object of {@link KJUR.asn1.DERInteger} parameters&lt;/li>
<span class='line'>1138</span>      * &lt;li>{Boolean}critical - critical flag&lt;/li>
<span class='line'>1139</span>      * &lt;/ul>
<span class='line'>1140</span>      * &lt;br>
<span class='line'>1141</span>      * NOTE: The 'authorityCertIssuer' and 'authorityCertSerialNumber'
<span class='line'>1142</span>      * supported since jsrsasign 9.0.0 x509 2.0.0.
<span class='line'>1143</span>      * @example
<span class='line'>1144</span>      * x = new X509();
<span class='line'>1145</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1146</span>      * x.getExtAuthorityKeyIdentifier() &rarr; 
<span class='line'>1147</span>      * { kid: {hex: "1234abcd..."},
<span class='line'>1148</span>      *   issuer: {hex: "30..."},
<span class='line'>1149</span>      *   sn: {hex: "1234..."},
<span class='line'>1150</span>      *   critical: true}
<span class='line'>1151</span>      */</span><span class="WHIT">
<span class='line'>1152</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtAuthorityKeyIdentifier</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1153</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1154</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"authorityKeyIdentifier"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1155</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1156</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1157</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1158</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1159</span> 
<span class='line'>1160</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"authorityKeyIdentifier"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1161</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1162</span> 
<span class='line'>1163</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1164</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1165</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hExtV.substr</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1166</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"80"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1167</span> </span><span class="WHIT">		</span><span class="NAME">result.kid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1168</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1169</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"a1"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1170</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hGNS</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1171</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">gnsParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralNames</span><span class="PUNC">(</span><span class="NAME">hGNS</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1172</span> </span><span class="WHIT">		</span><span class="NAME">result.issuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">gnsParam</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"dn"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1173</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1174</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"82"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1175</span> </span><span class="WHIT">		</span><span class="NAME">result.sn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1176</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1177</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1178</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1179</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1180</span> 
<span class='line'>1181</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1182</span>      * get extKeyUsage value as JSON object
<span class='line'>1183</span>      * @name getExtExtKeyUsage
<span class='line'>1184</span>      * @memberOf X509#
<span class='line'>1185</span>      * @function
<span class='line'>1186</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1187</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1188</span>      * @return {Array} JSON object of ExtKeyUsage parameter or undefined
<span class='line'>1189</span>      * @return {Object} JSONarray of extended key usage ID name or oid
<span class='line'>1190</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1191</span>      * @see KJUR.asn1.x509.ExtKeyUsage
<span class='line'>1192</span>      * @description
<span class='line'>1193</span>      * This method parse extKeyUsage extension. When arguments are
<span class='line'>1194</span>      * not specified, its extension in X509 object will be parsed.
<span class='line'>1195</span>      * Result of this method can be passed to 
<span class='line'>1196</span>      * {@link KJUR.asn1.x509.ExtKeyUsage} constructor.
<span class='line'>1197</span>      * &lt;br>
<span class='line'>1198</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>1199</span>      * will be generated from them.
<span class='line'>1200</span>      * @example
<span class='line'>1201</span>      * x = new X509();
<span class='line'>1202</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1203</span>      * x.getExtExtKeyUsage() &rarr;
<span class='line'>1204</span>      * { array: ["clientAuth", "emailProtection", "1.3.6.1.4.1.311.10.3.4"], 
<span class='line'>1205</span>      *   critical: true},
<span class='line'>1206</span>      */</span><span class="WHIT">
<span class='line'>1207</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtExtKeyUsage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1208</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1209</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"extKeyUsage"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1210</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1211</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1212</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1213</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1214</span> 
<span class='line'>1215</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"extKeyUsage"</span><span class="PUNC">,</span><span class="NAME">array</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1216</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1217</span> 
<span class='line'>1218</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1219</span> 
<span class='line'>1220</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1221</span> </span><span class="WHIT">	    </span><span class="NAME">result.array.push</span><span class="PUNC">(</span><span class="NAME">_oidname</span><span class="PUNC">(</span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1222</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1223</span> 
<span class='line'>1224</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1225</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1226</span> 
<span class='line'>1227</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1228</span>      * get extKeyUsage value as array of name string in the certificate(DEPRECATED)&lt;br/>
<span class='line'>1229</span>      * @name getExtExtKeyUsageName
<span class='line'>1230</span>      * @memberOf X509#
<span class='line'>1231</span>      * @function
<span class='line'>1232</span>      * @return {Object} array of extended key usage ID name or oid
<span class='line'>1233</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1234</span>      * @deprecated since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1235</span>      * @description
<span class='line'>1236</span>      * This method will get extended key usage extension value
<span class='line'>1237</span>      * as array of name or OID string.
<span class='line'>1238</span>      * If there is this in the certificate, it returns undefined;
<span class='line'>1239</span>      * &lt;br>
<span class='line'>1240</span>      * NOTE: Supported extended key usage ID names are defined in
<span class='line'>1241</span>      * name2oidList parameter in asn1x509.js file.
<span class='line'>1242</span>      * @example
<span class='line'>1243</span>      * x = new X509();
<span class='line'>1244</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1245</span>      * x.getExtExtKeyUsageName() &rarr; ["serverAuth", "clientAuth", "0.1.2.3.4.5"]
<span class='line'>1246</span>      */</span><span class="WHIT">
<span class='line'>1247</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtExtKeyUsageName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1248</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"extKeyUsage"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1249</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">info</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1250</span> 
<span class='line'>1251</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1252</span> </span><span class="WHIT">	
<span class='line'>1253</span> 	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">h</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1254</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">h</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1255</span> 
<span class='line'>1256</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1257</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1258</span> </span><span class="WHIT">	    </span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="NAME">_oidname</span><span class="PUNC">(</span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1259</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1260</span> 
<span class='line'>1261</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1262</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1263</span> 
<span class='line'>1264</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1265</span>      * get subjectAltName value as array of string in the certificate
<span class='line'>1266</span>      * @name getExtSubjectAltName
<span class='line'>1267</span>      * @memberOf X509#
<span class='line'>1268</span>      * @function
<span class='line'>1269</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1270</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1271</span>      * @return {Array} JSON object of SubjectAltName parameters or undefined
<span class='line'>1272</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1273</span>      * @see KJUR.asn1.x509.SubjectAltName
<span class='line'>1274</span>      * @see X509#getExtIssuerAltName
<span class='line'>1275</span>      * @description
<span class='line'>1276</span>      * This method will get subjectAltName value
<span class='line'>1277</span>      * as an array of JSON object which has properties defined
<span class='line'>1278</span>      * in {@link KJUR.asn1.x509.SubjectAltName}.
<span class='line'>1279</span>      * Result of this method can be passed to 
<span class='line'>1280</span>      * {@link KJUR.asn1.x509.SubjectAltName} constructor.
<span class='line'>1281</span>      * If there is no this extension in the certificate,
<span class='line'>1282</span>      * it returns undefined.
<span class='line'>1283</span>      * &lt;br>
<span class='line'>1284</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>1285</span>      * will be generated from them.
<span class='line'>1286</span>      * &lt;br>
<span class='line'>1287</span>      * CAUTION: return value of JSON object format have been changed
<span class='line'>1288</span>      * from jsrsasign 9.0.0 x509 2.0.0 without backword compatibility.
<span class='line'>1289</span>      * @example
<span class='line'>1290</span>      * x = new X509();
<span class='line'>1291</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1292</span>      * x.getExtSubjectAltName() &rarr; 
<span class='line'>1293</span>      * { array: [
<span class='line'>1294</span>      *     {uri: "http://example.com/"},
<span class='line'>1295</span>      *     {rfc822: "user1@example.com"},
<span class='line'>1296</span>      *     {dns: "example.com"}
<span class='line'>1297</span>      *   ],
<span class='line'>1298</span>      *   critical: true
<span class='line'>1299</span>      * }
<span class='line'>1300</span>      *
<span class='line'>1301</span>      * x.getExtSubjectAltName("3026...") &rarr;
<span class='line'>1302</span>      * { array: [{ip: "192.168.1.1"}] }
<span class='line'>1303</span>      */</span><span class="WHIT">
<span class='line'>1304</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtSubjectAltName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1305</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1306</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"subjectAltName"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1307</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1308</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1309</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1310</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1311</span> 
<span class='line'>1312</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"subjectAltName"</span><span class="PUNC">,</span><span class="NAME">array</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1313</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1314</span> 
<span class='line'>1315</span> </span><span class="WHIT">	</span><span class="NAME">result.array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralNames</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1316</span> 
<span class='line'>1317</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1318</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1319</span> 
<span class='line'>1320</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1321</span>      * get issuerAltName value as array of string in the certificate
<span class='line'>1322</span>      * @name getExtIssuerAltName
<span class='line'>1323</span>      * @memberOf X509#
<span class='line'>1324</span>      * @function
<span class='line'>1325</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1326</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1327</span>      * @return {Array} JSON object of IssuerAltName parameters
<span class='line'>1328</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1329</span>      * @see KJUR.asn1.x509.IssuerAltName
<span class='line'>1330</span>      * @see X509#getExtSubjectAltName
<span class='line'>1331</span>      * @description
<span class='line'>1332</span>      * This method will get issuerAltName value
<span class='line'>1333</span>      * as an array of JSON object which has properties defined
<span class='line'>1334</span>      * in {@link KJUR.asn1.x509.IssuerAltName}.
<span class='line'>1335</span>      * Result of this method can be passed to 
<span class='line'>1336</span>      * {@link KJUR.asn1.x509.IssuerAltName} constructor.
<span class='line'>1337</span>      * If there is no this extension in the certificate,
<span class='line'>1338</span>      * it returns undefined.
<span class='line'>1339</span>      * &lt;br>
<span class='line'>1340</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>1341</span>      * will be generated from them.
<span class='line'>1342</span>      * @example
<span class='line'>1343</span>      * x = new X509();
<span class='line'>1344</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1345</span>      * x.getExtIssuerAltName() &rarr; 
<span class='line'>1346</span>      * { array: [
<span class='line'>1347</span>      *     {uri: "http://example.com/"},
<span class='line'>1348</span>      *     {rfc822: "user1@example.com"},
<span class='line'>1349</span>      *     {dns: "example.com"}
<span class='line'>1350</span>      *   ],
<span class='line'>1351</span>      *   critical: true
<span class='line'>1352</span>      * }
<span class='line'>1353</span>      *
<span class='line'>1354</span>      * x.getExtIssuerAltName("3026...") &rarr;
<span class='line'>1355</span>      * { array: [{ip: "192.168.1.1"}] }
<span class='line'>1356</span>      */</span><span class="WHIT">
<span class='line'>1357</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtIssuerAltName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1358</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1359</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"issuerAltName"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1360</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1361</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1362</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1363</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1364</span> 
<span class='line'>1365</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"issuerAltName"</span><span class="PUNC">,</span><span class="NAME">array</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1366</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1367</span> 
<span class='line'>1368</span> </span><span class="WHIT">	</span><span class="NAME">result.array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralNames</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1369</span> 
<span class='line'>1370</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1371</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1372</span> 
<span class='line'>1373</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1374</span>      * get GeneralNames ASN.1 structure parameter as JSON object
<span class='line'>1375</span>      * @name getGeneralNames
<span class='line'>1376</span>      * @memberOf X509#
<span class='line'>1377</span>      * @function
<span class='line'>1378</span>      * @param {String} h hexadecimal string of GeneralNames
<span class='line'>1379</span>      * @return {Array} array of GeneralNames parameters
<span class='line'>1380</span>      * @see KJUR.asn1.x509.GeneralNames
<span class='line'>1381</span>      * @see KJUR.asn1.x509.GeneralName
<span class='line'>1382</span>      * @see X509#getGeneralNames
<span class='line'>1383</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1384</span>      * @description
<span class='line'>1385</span>      * This method will get GeneralNames parameters defined in
<span class='line'>1386</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.6">
<span class='line'>1387</span>      * RFC 5280 4.2.1.6&lt;/a>.
<span class='line'>1388</span>      * &lt;pre>
<span class='line'>1389</span>      * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
<span class='line'>1390</span>      * &lt;/pre>
<span class='line'>1391</span>      * Result of this method can be passed to
<span class='line'>1392</span>      * {@link KJUR.asn1.x509.GeneralNames} constructor.
<span class='line'>1393</span>      * @example
<span class='line'>1394</span>      * x = new X509();
<span class='line'>1395</span>      * x.getGeneralNames("3011860f687474703a2f2f6161612e636f6d2f")
<span class='line'>1396</span>      * &rarr; [{uri: "http://aaa.com/"}]
<span class='line'>1397</span>      *
<span class='line'>1398</span>      * x.getGeneralNames("301ea41c30...") &rarr;
<span class='line'>1399</span>      * [{ dn: {
<span class='line'>1400</span>      *     array: [
<span class='line'>1401</span>      *       [{type:"C", value:"JP", ds:"prn"}],
<span class='line'>1402</span>      *       [{type:"O", value:"T1", ds:"utf8"}]
<span class='line'>1403</span>      *     ],
<span class='line'>1404</span>      *     str: "/C=JP/O=T1" } }]
<span class='line'>1405</span>      */</span><span class="WHIT">
<span class='line'>1406</span> </span><span class="WHIT">    </span><span class="NAME">this.getGeneralNames</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1407</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1408</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1409</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1410</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">gnParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralName</span><span class="PUNC">(</span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1411</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">gnParam</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="NAME">gnParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1412</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1413</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1414</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1415</span> 
<span class='line'>1416</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1417</span>      * get GeneralName ASN.1 structure parameter as JSON object&lt;br/>
<span class='line'>1418</span>      * @name getGeneralName
<span class='line'>1419</span>      * @memberOf X509#
<span class='line'>1420</span>      * @function
<span class='line'>1421</span>      * @param {String} h hexadecimal string of GeneralName
<span class='line'>1422</span>      * @return {Array} JSON object of GeneralName parameters or undefined
<span class='line'>1423</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1424</span>      * @see KJUR.asn1.x509.GeneralNames
<span class='line'>1425</span>      * @see KJUR.asn1.x509.GeneralName
<span class='line'>1426</span>      * @see KJUR.asn1.x509.OtherName
<span class='line'>1427</span>      * @see X509#getGeneralName
<span class='line'>1428</span>      * @see X509#getOtherName
<span class='line'>1429</span>      *
<span class='line'>1430</span>      * @description
<span class='line'>1431</span>      * This method will get GeneralName parameters defined in
<span class='line'>1432</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.6">
<span class='line'>1433</span>      * RFC 5280 4.2.1.6&lt;/a>.
<span class='line'>1434</span>      * &lt;pre>
<span class='line'>1435</span>      * GeneralName ::= CHOICE {
<span class='line'>1436</span>      *      otherName                       [0]     OtherName,
<span class='line'>1437</span>      *      rfc822Name                      [1]     IA5String,
<span class='line'>1438</span>      *      dNSName                         [2]     IA5String,
<span class='line'>1439</span>      *      x400Address                     [3]     ORAddress,
<span class='line'>1440</span>      *      directoryName                   [4]     Name,
<span class='line'>1441</span>      *      ediPartyName                    [5]     EDIPartyName,
<span class='line'>1442</span>      *      uniformResourceIdentifier       [6]     IA5String,
<span class='line'>1443</span>      *      iPAddress                       [7]     OCTET STRING,
<span class='line'>1444</span>      *      registeredID                    [8]     OBJECT IDENTIFIER }
<span class='line'>1445</span>      * &lt;/pre>
<span class='line'>1446</span>      * Result of this method can be passed to
<span class='line'>1447</span>      * {@link KJUR.asn1.x509.GeneralName} constructor.
<span class='line'>1448</span>      * @example
<span class='line'>1449</span>      * x = new X509();
<span class='line'>1450</span>      * x.getGeneralName("860f687474703a2f2f6161612e636f6d2f") 
<span class='line'>1451</span>      * &rarr; {uri: "http://aaa.com/"}
<span class='line'>1452</span>      * x.getGeneralName("a41c30...") &rarr;
<span class='line'>1453</span>      * { dn: {
<span class='line'>1454</span>      *     array: [
<span class='line'>1455</span>      *       [{type:"C", value:"JP", ds:"prn"}],
<span class='line'>1456</span>      *       [{type:"O", value:"T1", ds:"utf8"}]
<span class='line'>1457</span>      *     ],
<span class='line'>1458</span>      *     str: "/C=JP/O=T1" } }
<span class='line'>1459</span>      */</span><span class="WHIT">
<span class='line'>1460</span> </span><span class="WHIT">    </span><span class="NAME">this.getGeneralName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1461</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">h.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1462</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1463</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextorstr</span><span class="PUNC">(</span><span class="NAME">hValue</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1464</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"81"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">rfc822</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sValue</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1465</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"82"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">dns</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sValue</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1466</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"86"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">uri</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sValue</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1467</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"87"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">ip</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hextoip</span><span class="PUNC">(</span><span class="NAME">hValue</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1468</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a4"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">dn</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.getX500Name</span><span class="PUNC">(</span><span class="NAME">hValue</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1469</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">other</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.getOtherName</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1470</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1471</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1472</span> 
<span class='line'>1473</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1474</span>      * get subjectAltName value as array of string in the certificate (DEPRECATED)
<span class='line'>1475</span>      * @name getExtSubjectAltName2
<span class='line'>1476</span>      * @memberOf X509#
<span class='line'>1477</span>      * @function
<span class='line'>1478</span>      * @return {Object} array of alt name array
<span class='line'>1479</span>      * @since jsrsasign 8.0.1 x509 1.1.17
<span class='line'>1480</span>      * @deprecated jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1481</span>      * @description
<span class='line'>1482</span>      * This method will get subject alt name extension value
<span class='line'>1483</span>      * as array of type and name.
<span class='line'>1484</span>      * If there is this in the certificate, it returns undefined;
<span class='line'>1485</span>      * Type of GeneralName will be shown as following:
<span class='line'>1486</span>      * &lt;ul>
<span class='line'>1487</span>      * &lt;li>"MAIL" - [1]rfc822Name&lt;/li>
<span class='line'>1488</span>      * &lt;li>"DNS"  - [2]dNSName&lt;/li>
<span class='line'>1489</span>      * &lt;li>"DN"   - [4]directoryName&lt;/li>
<span class='line'>1490</span>      * &lt;li>"URI"  - [6]uniformResourceIdentifier&lt;/li>
<span class='line'>1491</span>      * &lt;li>"IP"   - [7]iPAddress&lt;/li>
<span class='line'>1492</span>      * &lt;/ul>
<span class='line'>1493</span>      * @example
<span class='line'>1494</span>      * x = new X509();
<span class='line'>1495</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1496</span>      * x.getExtSubjectAltName2() &rarr;
<span class='line'>1497</span>      * [["DNS",  "example.com"],
<span class='line'>1498</span>      *  ["DNS",  "example.org"],
<span class='line'>1499</span>      *  ["MAIL", "foo@example.com"],
<span class='line'>1500</span>      *  ["IP",   "192.168.1.1"],
<span class='line'>1501</span>      *  ["IP",   "2001:db8::2:1"],
<span class='line'>1502</span>      *  ["DN",   "/C=US/O=TEST1"]]
<span class='line'>1503</span>      */</span><span class="WHIT">
<span class='line'>1504</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtSubjectAltName2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1505</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">gnValueHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">gnValueStr</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">gnTag</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1506</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"subjectAltName"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1507</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">info</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1508</span> 
<span class='line'>1509</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1510</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">h</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1511</span> 
<span class='line'>1512</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1513</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1514</span> </span><span class="WHIT">	    </span><span class="NAME">gnTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">h.substr</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1515</span> </span><span class="WHIT">	    </span><span class="NAME">gnValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1516</span> </span><span class="WHIT">	    
<span class='line'>1517</span> 	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">gnTag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"81"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// rfc822Name [1]</span><span class="WHIT">
<span class='line'>1518</span> </span><span class="WHIT">		</span><span class="NAME">gnValueStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextoutf8</span><span class="PUNC">(</span><span class="NAME">gnValueHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1519</span> </span><span class="WHIT">		</span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"MAIL"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">gnValueStr</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1520</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1521</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">gnTag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"82"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// dNSName [2]</span><span class="WHIT">
<span class='line'>1522</span> </span><span class="WHIT">		</span><span class="NAME">gnValueStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextoutf8</span><span class="PUNC">(</span><span class="NAME">gnValueHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1523</span> </span><span class="WHIT">		</span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"DNS"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">gnValueStr</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1524</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1525</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">gnTag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"84"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// directoryName [4]</span><span class="WHIT">
<span class='line'>1526</span> </span><span class="WHIT">		</span><span class="NAME">gnValueStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">X509.hex2dn</span><span class="PUNC">(</span><span class="NAME">gnValueHex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1527</span> </span><span class="WHIT">		</span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"DN"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">gnValueStr</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1528</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1529</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">gnTag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"86"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// uniformResourceIdentifier [6]</span><span class="WHIT">
<span class='line'>1530</span> </span><span class="WHIT">		</span><span class="NAME">gnValueStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextoutf8</span><span class="PUNC">(</span><span class="NAME">gnValueHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1531</span> </span><span class="WHIT">		</span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"URI"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">gnValueStr</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1532</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1533</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">gnTag</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"87"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// iPAddress [7]</span><span class="WHIT">
<span class='line'>1534</span> </span><span class="WHIT">		</span><span class="NAME">gnValueStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextoip</span><span class="PUNC">(</span><span class="NAME">gnValueHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1535</span> </span><span class="WHIT">		</span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"IP"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">gnValueStr</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1536</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1537</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1538</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1539</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1540</span> 
<span class='line'>1541</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1542</span>      * get CRLDistributionPoints extension value as JSON object
<span class='line'>1543</span>      * @name getExtCRLDistributionPoints
<span class='line'>1544</span>      * @memberOf X509#
<span class='line'>1545</span>      * @function
<span class='line'>1546</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1547</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1548</span>      * @return {Object} JSON object of CRLDistributionPoints parameters or undefined
<span class='line'>1549</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1550</span>      * @see KJUR.asn1.x509.CRLDistributionPoints
<span class='line'>1551</span>      * @see X509#getDistributionPoint
<span class='line'>1552</span>      * @see X509#getDistributionPointName
<span class='line'>1553</span>      * @see X509#getGeneralNames
<span class='line'>1554</span>      * @see X509#getGeneralName
<span class='line'>1555</span>      * @description
<span class='line'>1556</span>      * This method will get certificate policies value
<span class='line'>1557</span>      * as an array of JSON object which has properties defined
<span class='line'>1558</span>      * in {@link KJUR.asn1.x509.CRLDistributionPoints}.
<span class='line'>1559</span>      * Result of this method can be passed to 
<span class='line'>1560</span>      * {@link KJUR.asn1.x509.CRLDistributionPoints} constructor.
<span class='line'>1561</span>      * If there is no this extension in the certificate,
<span class='line'>1562</span>      * it returns undefined.
<span class='line'>1563</span>      * @example
<span class='line'>1564</span>      * x = new X509();
<span class='line'>1565</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1566</span>      * x.getExtCRLDistributionPoints() &rarr; 
<span class='line'>1567</span>      * {array: [
<span class='line'>1568</span>      *   {dpname: {full: [{uri: "http://example.com/"}]}},
<span class='line'>1569</span>      *   {dpname: {full: [{uri: "ldap://example.com/"}]}}
<span class='line'>1570</span>      *  ],
<span class='line'>1571</span>      *  critical: true}
<span class='line'>1572</span>      */</span><span class="WHIT">
<span class='line'>1573</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtCRLDistributionPoints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1574</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1575</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"cRLDistributionPoints"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1576</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1577</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1578</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1579</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1580</span> 
<span class='line'>1581</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"cRLDistributionPoints"</span><span class="PUNC">,</span><span class="NAME">array</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1582</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1583</span> 
<span class='line'>1584</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1585</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1586</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1587</span> </span><span class="WHIT">	    </span><span class="NAME">result.array.push</span><span class="PUNC">(</span><span class="NAME">this.getDistributionPoint</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1588</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1589</span> 
<span class='line'>1590</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1591</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1592</span> 
<span class='line'>1593</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1594</span>      * get DistributionPoint ASN.1 structure parameter as JSON object
<span class='line'>1595</span>      * @name getDistributionPoint
<span class='line'>1596</span>      * @memberOf X509#
<span class='line'>1597</span>      * @function
<span class='line'>1598</span>      * @param {String} h hexadecimal string of DistributionPoint
<span class='line'>1599</span>      * @return {Object} JSON object of DistributionPoint parameters
<span class='line'>1600</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1601</span>      * @see X509#getExtCRLDistributionPoints
<span class='line'>1602</span>      * @see X509#getDistributionPointName
<span class='line'>1603</span>      * @see X509#getGeneralNames
<span class='line'>1604</span>      * @see X509#getGeneralName
<span class='line'>1605</span>      * @description
<span class='line'>1606</span>      * This method will get DistributionPoint parameters.
<span class='line'>1607</span>      * Result of this method can be passed to
<span class='line'>1608</span>      * {@link KJUR.asn1.x509.DistributionPoint} constructor.
<span class='line'>1609</span>      * &lt;br/>
<span class='line'>1610</span>      * NOTE: reasons[1] and CRLIssuer[2] field not supported
<span class='line'>1611</span>      * @example
<span class='line'>1612</span>      * x = new X509();
<span class='line'>1613</span>      * x.getDistributionPoint("30...") &rarr;
<span class='line'>1614</span>      * {dpname: {full: [{uri: "http://aaa.com/"}]}}
<span class='line'>1615</span>      */</span><span class="WHIT">
<span class='line'>1616</span> </span><span class="WHIT">    </span><span class="NAME">this.getDistributionPoint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1617</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1618</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1619</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1620</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">h.substr</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1621</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1622</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1623</span> </span><span class="WHIT">		</span><span class="NAME">result.dpname</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getDistributionPointName</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1624</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1625</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1626</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1627</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1628</span> 
<span class='line'>1629</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1630</span>      * get DistributionPointName ASN.1 structure parameter as JSON object
<span class='line'>1631</span>      * @name getDistributionPointName
<span class='line'>1632</span>      * @memberOf X509#
<span class='line'>1633</span>      * @function
<span class='line'>1634</span>      * @param {String} h hexadecimal string of DistributionPointName
<span class='line'>1635</span>      * @return {Object} JSON object of DistributionPointName parameters
<span class='line'>1636</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1637</span>      * @see X509#getExtCRLDistributionPoints
<span class='line'>1638</span>      * @see X509#getDistributionPoint
<span class='line'>1639</span>      * @see X509#getGeneralNames
<span class='line'>1640</span>      * @see X509#getGeneralName
<span class='line'>1641</span>      * @description
<span class='line'>1642</span>      * This method will get DistributionPointName parameters.
<span class='line'>1643</span>      * Result of this method can be passed to
<span class='line'>1644</span>      * {@link KJUR.asn1.x509.DistributionPointName} constructor.
<span class='line'>1645</span>      * &lt;br/>
<span class='line'>1646</span>      * NOTE: nameRelativeToCRLIssuer[1] not supported
<span class='line'>1647</span>      * @example
<span class='line'>1648</span>      * x = new X509();
<span class='line'>1649</span>      * x.getDistributionPointName("a0...") &rarr;
<span class='line'>1650</span>      * {full: [{uri: "http://aaa.com/"}]}
<span class='line'>1651</span>      */</span><span class="WHIT">
<span class='line'>1652</span> </span><span class="WHIT">    </span><span class="NAME">this.getDistributionPointName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1653</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1654</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1655</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1656</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">h.substr</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1657</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1658</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1659</span> </span><span class="WHIT">		</span><span class="NAME">result.full</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralNames</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1660</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1661</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1662</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1663</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1664</span> 
<span class='line'>1665</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1666</span>      * get array of string for fullName URIs in cRLDistributionPoints(CDP) in the certificate (DEPRECATED)
<span class='line'>1667</span>      * @name getExtCRLDistributionPointsURI
<span class='line'>1668</span>      * @memberOf X509#
<span class='line'>1669</span>      * @function
<span class='line'>1670</span>      * @return {Object} array of fullName URIs of CDP of the certificate
<span class='line'>1671</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1672</span>      * @description
<span class='line'>1673</span>      * This method will get all fullName URIs of cRLDistributionPoints extension
<span class='line'>1674</span>      * in the certificate as array of URI string.
<span class='line'>1675</span>      * If there is this in the certificate, it returns undefined;
<span class='line'>1676</span>      * &lt;br>
<span class='line'>1677</span>      * NOTE: Currently this method supports only fullName URI so that
<span class='line'>1678</span>      * other parameters will not be returned.
<span class='line'>1679</span>      * @example
<span class='line'>1680</span>      * x = new X509();
<span class='line'>1681</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1682</span>      * x.getExtCRLDistributionPointsURI() &rarr;
<span class='line'>1683</span>      * ["http://example.com/aaa.crl", "http://example.org/aaa.crl"]
<span class='line'>1684</span>      */</span><span class="WHIT">
<span class='line'>1685</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtCRLDistributionPointsURI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1686</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtCRLDistributionPoints</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1687</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">p</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1688</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1689</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1690</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1691</span> </span><span class="WHIT">	    </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1692</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dpname.full</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">uri</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1693</span> </span><span class="WHIT">		    </span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dpname.full</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">uri</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1694</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1695</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1696</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1697</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1698</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1699</span> 
<span class='line'>1700</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1701</span>      * get AuthorityInfoAccess extension value in the certificate as associative array
<span class='line'>1702</span>      * @name getExtAIAInfo
<span class='line'>1703</span>      * @memberOf X509#
<span class='line'>1704</span>      * @function
<span class='line'>1705</span>      * @return {Object} associative array of AIA extension properties
<span class='line'>1706</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1707</span>      * @description
<span class='line'>1708</span>      * This method will get authority info access value
<span class='line'>1709</span>      * as associate array which has following properties:
<span class='line'>1710</span>      * &lt;ul>
<span class='line'>1711</span>      * &lt;li>ocsp - array of string for OCSP responder URL&lt;/li>
<span class='line'>1712</span>      * &lt;li>caissuer - array of string for caIssuer value (i.e. CA certificates URL)&lt;/li>
<span class='line'>1713</span>      * &lt;/ul>
<span class='line'>1714</span>      * If there is this in the certificate, it returns undefined;
<span class='line'>1715</span>      * @example
<span class='line'>1716</span>      * x = new X509();
<span class='line'>1717</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1718</span>      * x.getExtAIAInfo(hCert) &rarr; 
<span class='line'>1719</span>      * { ocsp:     ["http://ocsp.foo.com"],
<span class='line'>1720</span>      *   caissuer: ["http://rep.foo.com/aaa.p8m"] }
<span class='line'>1721</span>      */</span><span class="WHIT">
<span class='line'>1722</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtAIAInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1723</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"authorityInfoAccess"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1724</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">info</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1725</span> 
<span class='line'>1726</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">ocsp</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">caissuer</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1727</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1728</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1729</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hOID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1730</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"86"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1731</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hOID</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"2b06010505073001"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1732</span> </span><span class="WHIT">		</span><span class="NAME">result.ocsp.push</span><span class="PUNC">(</span><span class="NAME">hextoutf8</span><span class="PUNC">(</span><span class="NAME">hName</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1733</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1734</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hOID</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"2b06010505073002"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1735</span> </span><span class="WHIT">		</span><span class="NAME">result.caissuer.push</span><span class="PUNC">(</span><span class="NAME">hextoutf8</span><span class="PUNC">(</span><span class="NAME">hName</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1736</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1737</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1738</span> 
<span class='line'>1739</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1740</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1741</span> 
<span class='line'>1742</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1743</span>      * get AuthorityInfoAccess extension value as JSON object
<span class='line'>1744</span>      * @name getExtAuthorityInfoAccess
<span class='line'>1745</span>      * @memberOf X509#
<span class='line'>1746</span>      * @function
<span class='line'>1747</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1748</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1749</span>      * @return {Array} JSON object of AuthorityInfoAccess parameters or undefined
<span class='line'>1750</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1751</span>      * @see KJUR.asn1.x509.AuthorityInfoAccess
<span class='line'>1752</span>      * @description
<span class='line'>1753</span>      * This method parse authorityInfoAccess extension. When arguments are
<span class='line'>1754</span>      * not specified, its extension in X509 object will be parsed.
<span class='line'>1755</span>      * Result of this method can be passed to 
<span class='line'>1756</span>      * {@link KJUR.asn1.x509.AuthorityInfoAccess} constructor.
<span class='line'>1757</span>      * &lt;br>
<span class='line'>1758</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>1759</span>      * will be generated from them.
<span class='line'>1760</span>      * @example
<span class='line'>1761</span>      * x = new X509();
<span class='line'>1762</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1763</span>      * x.getExtAuthorityInfoAccess() &rarr;
<span class='line'>1764</span>      * {
<span class='line'>1765</span>      *   critial: true, // 
<span class='line'>1766</span>      *   array: [{ocsp: http://ocsp.example.com/},
<span class='line'>1767</span>      *           {caissuer: https://repository.example.com/}]
<span class='line'>1768</span>      * }
<span class='line'>1769</span>      *
<span class='line'>1770</span>      * x = new X509();
<span class='line'>1771</span>      * x.getExtAuthorityInfoAccesss("306230...") 
<span class='line'>1772</span>      * x.getExtAuthorityInfoAccesss("306230...", true) 
<span class='line'>1773</span>      */</span><span class="WHIT">
<span class='line'>1774</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtAuthorityInfoAccess</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1775</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1776</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"authorityInfoAccess"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1777</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1778</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1779</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1780</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1781</span> 
<span class='line'>1782</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"authorityInfoAccess"</span><span class="PUNC">,</span><span class="NAME">array</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1783</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1784</span> 
<span class='line'>1785</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1786</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1787</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hMethod</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyListEx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1788</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hLoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"86"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1789</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sLoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextoutf8</span><span class="PUNC">(</span><span class="NAME">hLoc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1790</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hMethod</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2b06010505073001"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1791</span> </span><span class="WHIT">		</span><span class="NAME">result.array.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">ocsp</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sLoc</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1792</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hMethod</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2b06010505073002"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1793</span> </span><span class="WHIT">		</span><span class="NAME">result.array.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">caissuer</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sLoc</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1794</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1795</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"unknown method: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hMethod</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1796</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1797</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1798</span> 
<span class='line'>1799</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1800</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1801</span> 
<span class='line'>1802</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1803</span>      * get CertificatePolicies extension value as JSON object
<span class='line'>1804</span>      * @name getExtCertificatePolicies
<span class='line'>1805</span>      * @memberOf X509#
<span class='line'>1806</span>      * @function
<span class='line'>1807</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>1808</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>1809</span>      * @return {Object} JSON object of CertificatePolicies parameters or undefined
<span class='line'>1810</span>      * @since jsrsasign 7.2.0 x509 1.1.14
<span class='line'>1811</span>      * @description
<span class='line'>1812</span>      * This method will get certificate policies value
<span class='line'>1813</span>      * as an array of JSON object which has properties defined
<span class='line'>1814</span>      * in {@link KJUR.asn1.x509.CertificatePolicies}.
<span class='line'>1815</span>      * Result of this method can be passed to 
<span class='line'>1816</span>      * {@link KJUR.asn1.x509.CertificatePolicies} constructor.
<span class='line'>1817</span>      * If there is no this extension in the certificate,
<span class='line'>1818</span>      * it returns undefined.
<span class='line'>1819</span>      * &lt;br>
<span class='line'>1820</span>      * CAUTION: return value of JSON object format have been changed
<span class='line'>1821</span>      * from jsrsasign 9.0.0 without backword compatibility.
<span class='line'>1822</span>      * &lt;br>
<span class='line'>1823</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>1824</span>      * will be generated from them.
<span class='line'>1825</span>      * @example
<span class='line'>1826</span>      * x = new X509();
<span class='line'>1827</span>      * x.readCertPEM(sCertPEM); // parseExt() will also be called internally.
<span class='line'>1828</span>      * x.getExtCertificatePolicies() &rarr; 
<span class='line'>1829</span>      * { array: [
<span class='line'>1830</span>      *   { policyoid: "1.2.3.4" }
<span class='line'>1831</span>      *   { policyoid: "1.2.3.5",
<span class='line'>1832</span>      *     array: [
<span class='line'>1833</span>      *       { cps: "https://example.com/" },
<span class='line'>1834</span>      *       { unotice: { exptext: { type: "bmp", str: "sample text" } } }
<span class='line'>1835</span>      *     ] 
<span class='line'>1836</span>      *   }
<span class='line'>1837</span>      * ]}
<span class='line'>1838</span>      */</span><span class="WHIT">
<span class='line'>1839</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtCertificatePolicies</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1840</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1841</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"certificatePolicies"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1842</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1843</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1844</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1845</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1846</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"certificatePolicies"</span><span class="PUNC">,</span><span class="NAME">array</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1847</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1848</span> 
<span class='line'>1849</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdxPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// PolicyInformation list index</span><span class="WHIT">
<span class='line'>1850</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdxPI.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1851</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hPolicyInformation</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdxPI</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1852</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">polinfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getPolicyInformation</span><span class="PUNC">(</span><span class="NAME">hPolicyInformation</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1853</span> </span><span class="WHIT">	    </span><span class="NAME">result.array.push</span><span class="PUNC">(</span><span class="NAME">polinfo</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1854</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1855</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1856</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1857</span> 
<span class='line'>1858</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1859</span>      * get PolicyInformation ASN.1 structure parameter as JSON object
<span class='line'>1860</span>      * @name getPolicyInformation
<span class='line'>1861</span>      * @memberOf X509#
<span class='line'>1862</span>      * @function
<span class='line'>1863</span>      * @param {String} h hexadecimal string of PolicyInformation
<span class='line'>1864</span>      * @return {Object} JSON object of PolicyInformation parameters
<span class='line'>1865</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1866</span>      * @description
<span class='line'>1867</span>      * This method will get PolicyInformation parameters defined in
<span class='line'>1868</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>1869</span>      * RFC 5280 4.2.1.4&lt;/a>.
<span class='line'>1870</span>      * &lt;pre>
<span class='line'>1871</span>      * PolicyInformation ::= SEQUENCE {
<span class='line'>1872</span>      *      policyIdentifier   CertPolicyId,
<span class='line'>1873</span>      *      policyQualifiers   SEQUENCE SIZE (1..MAX) OF
<span class='line'>1874</span>      *                              PolicyQualifierInfo OPTIONAL }
<span class='line'>1875</span>      * &lt;/pre>
<span class='line'>1876</span>      * Result of this method can be passed to
<span class='line'>1877</span>      * {@link KJUR.asn1.x509.PolicyInformation} constructor.
<span class='line'>1878</span>      * @example
<span class='line'>1879</span>      * x = new X509();
<span class='line'>1880</span>      * x.getPolicyInformation("30...") &rarr;
<span class='line'>1881</span>      * {
<span class='line'>1882</span>      *     policyoid: "2.16.840.1.114412.2.1",
<span class='line'>1883</span>      *     array: [{cps: "https://www.digicert.com/CPS"}]
<span class='line'>1884</span>      * }
<span class='line'>1885</span>      */</span><span class="WHIT">
<span class='line'>1886</span> </span><span class="WHIT">    </span><span class="NAME">this.getPolicyInformation</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1887</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1888</span> 
<span class='line'>1889</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hPOLICYOID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1890</span> </span><span class="WHIT">	</span><span class="NAME">result.policyoid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_oidname</span><span class="PUNC">(</span><span class="NAME">hPOLICYOID</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1891</span> </span><span class="WHIT">	
<span class='line'>1892</span> 	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idxPQSEQ</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyListEx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1893</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idxPQSEQ</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1894</span> </span><span class="WHIT">	    </span><span class="NAME">result.array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1895</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idxPQSEQ</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1896</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1897</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hPQI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1898</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pqinfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getPolicyQualifierInfo</span><span class="PUNC">(</span><span class="NAME">hPQI</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1899</span> </span><span class="WHIT">		</span><span class="NAME">result.array.push</span><span class="PUNC">(</span><span class="NAME">pqinfo</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1900</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1901</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1902</span> 
<span class='line'>1903</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1904</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1905</span> 
<span class='line'>1906</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1907</span>      * getOtherName ASN.1 structure parameter as JSON object&lt;br/>
<span class='line'>1908</span>      * @name getOtherName
<span class='line'>1909</span>      * @memberOf X509#
<span class='line'>1910</span>      * @param {String} h hexadecimal string of GeneralName
<span class='line'>1911</span>      * @return {Array} associative array of OtherName
<span class='line'>1912</span>      * @since jsrsasign 10.5.3 x509 2.0.12
<span class='line'>1913</span>      * @see KJUR.asn1.x509.GeneralNames
<span class='line'>1914</span>      * @see KJUR.asn1.x509.GeneralName
<span class='line'>1915</span>      * @see KJUR.asn1.x509.OtherName
<span class='line'>1916</span>      * @see X509#getGeneralName
<span class='line'>1917</span>      * @see ASN1HEX#parse
<span class='line'>1918</span>      *
<span class='line'>1919</span>      * @description
<span class='line'>1920</span>      * This method will get OtherName parameters defined in
<span class='line'>1921</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.6">
<span class='line'>1922</span>      * RFC 5280 4.2.1.6&lt;/a>.
<span class='line'>1923</span>      * &lt;pre>
<span class='line'>1924</span>      * OtherName ::= SEQUENCE {
<span class='line'>1925</span>      *    type-id    OBJECT IDENTIFIER,
<span class='line'>1926</span>      *    value      [0] EXPLICIT ANY DEFINED BY type-id }
<span class='line'>1927</span>      * &lt;/pre>
<span class='line'>1928</span>      * The value of member "other" is converted by 
<span class='line'>1929</span>      * {@link ASN1HEX#parse}.
<span class='line'>1930</span>      *
<span class='line'>1931</span>      * @example
<span class='line'>1932</span>      * x = new X509();
<span class='line'>1933</span>      * x.getOtherName("30...") &rarr;
<span class='line'>1934</span>      * { oid: "1.2.3.4",
<span class='line'>1935</span>      *   value: {utf8str: {str: "aaa"}} }
<span class='line'>1936</span>      */</span><span class="WHIT">
<span class='line'>1937</span> </span><span class="WHIT">    </span><span class="NAME">this.getOtherName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1938</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1939</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1940</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hOID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1941</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1942</span> </span><span class="WHIT">	</span><span class="NAME">result.oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_oidname</span><span class="PUNC">(</span><span class="NAME">hOID</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1943</span> </span><span class="WHIT">	</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX_parse</span><span class="PUNC">(</span><span class="NAME">hValue</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1944</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1945</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1946</span> 
<span class='line'>1947</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1948</span>      * get PolicyQualifierInfo ASN.1 structure parameter as JSON object
<span class='line'>1949</span>      * @name getPolicyQualifierInfo
<span class='line'>1950</span>      * @memberOf X509#
<span class='line'>1951</span>      * @function
<span class='line'>1952</span>      * @param {String} h hexadecimal string of PolicyQualifierInfo
<span class='line'>1953</span>      * @return {Object} JSON object of PolicyQualifierInfo parameters
<span class='line'>1954</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>1955</span>      * @see X509#getExtCertificatePolicies
<span class='line'>1956</span>      * @see X509#getPolicyInformation
<span class='line'>1957</span>      * @description
<span class='line'>1958</span>      * This method will get 
<span class='line'>1959</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>1960</span>      * PolicyQualifierInfo&lt;/a> parameters.
<span class='line'>1961</span>      * &lt;pre>
<span class='line'>1962</span>      * PolicyQualifierInfo ::= SEQUENCE {
<span class='line'>1963</span>      *      policyQualifierId  PolicyQualifierId,
<span class='line'>1964</span>      *      qualifier          ANY DEFINED BY policyQualifierId }
<span class='line'>1965</span>      * id-qt          OBJECT IDENTIFIER ::=  { id-pkix 2 }
<span class='line'>1966</span>      * id-qt-cps      OBJECT IDENTIFIER ::=  { id-qt 1 }
<span class='line'>1967</span>      * id-qt-unotice  OBJECT IDENTIFIER ::=  { id-qt 2 }
<span class='line'>1968</span>      * PolicyQualifierId ::= OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
<span class='line'>1969</span>      * Qualifier ::= CHOICE {
<span class='line'>1970</span>      *      cPSuri           CPSuri,
<span class='line'>1971</span>      *      userNotice       UserNotice }
<span class='line'>1972</span>      * CPSuri ::= IA5String
<span class='line'>1973</span>      * &lt;/pre>
<span class='line'>1974</span>      * Result of this method can be passed to 
<span class='line'>1975</span>      * {@link KJUR.asn1.x509.PolicyQualifierInfo} constructor.
<span class='line'>1976</span>      * @example
<span class='line'>1977</span>      * x = new X509();
<span class='line'>1978</span>      * x.getPolicyQualifierInfo("30...") 
<span class='line'>1979</span>      * &rarr; {unotice: {exptext: {type: 'utf8', str: 'aaa'}}}
<span class='line'>1980</span>      * x.getPolicyQualifierInfo("30...") 
<span class='line'>1981</span>      * &rarr; {cps: "https://repository.example.com/"}
<span class='line'>1982</span>      */</span><span class="WHIT">
<span class='line'>1983</span> </span><span class="WHIT">    </span><span class="NAME">this.getPolicyQualifierInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>1984</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1985</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hPQOID</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1986</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hPQOID</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"2b06010505070201"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// cps</span><span class="WHIT">
<span class='line'>1987</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hCPSURI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyListEx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"16"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1988</span> </span><span class="WHIT">	    </span><span class="NAME">result.cps</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextorstr</span><span class="PUNC">(</span><span class="NAME">hCPSURI</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1989</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hPQOID</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"2b06010505070202"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// unotice</span><span class="WHIT">
<span class='line'>1990</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hUserNotice</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1991</span> </span><span class="WHIT">	    </span><span class="NAME">result.unotice</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getUserNotice</span><span class="PUNC">(</span><span class="NAME">hUserNotice</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1992</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>1993</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1994</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>1995</span> 
<span class='line'>1996</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>1997</span>      * get UserNotice ASN.1 structure parameter as JSON object
<span class='line'>1998</span>      * @name getUserNotice
<span class='line'>1999</span>      * @memberOf X509#
<span class='line'>2000</span>      * @function
<span class='line'>2001</span>      * @param {String} h hexadecimal string of UserNotice
<span class='line'>2002</span>      * @return {Object} JSON object of UserNotice parameters
<span class='line'>2003</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>2004</span>      * @see X509#getExtCertificatePolicies
<span class='line'>2005</span>      * @see X509#getPolicyInformation
<span class='line'>2006</span>      * @see X509#getPolicyQualifierInfo
<span class='line'>2007</span>      * @description
<span class='line'>2008</span>      * This method will get 
<span class='line'>2009</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>2010</span>      * UserNotice&lt;/a> parameters.
<span class='line'>2011</span>      * &lt;pre>
<span class='line'>2012</span>      * UserNotice ::= SEQUENCE {
<span class='line'>2013</span>      *      noticeRef        NoticeReference OPTIONAL,
<span class='line'>2014</span>      *      explicitText     DisplayText OPTIONAL }
<span class='line'>2015</span>      * &lt;/pre>
<span class='line'>2016</span>      * Result of this method can be passed to 
<span class='line'>2017</span>      * {@link KJUR.asn1.x509.NoticeReference} constructor.
<span class='line'>2018</span>      * &lt;br/>
<span class='line'>2019</span>      * NOTE: NoticeReference parsing is currently not supported and
<span class='line'>2020</span>      * it will be ignored.
<span class='line'>2021</span>      * @example
<span class='line'>2022</span>      * x = new X509();
<span class='line'>2023</span>      * x.getUserNotice("30...") &rarr; {exptext: {type: 'utf8', str: 'aaa'}}
<span class='line'>2024</span>      */</span><span class="WHIT">
<span class='line'>2025</span> </span><span class="WHIT">    </span><span class="NAME">this.getUserNotice</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2026</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2027</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2028</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2029</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hItem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2030</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hItem.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2031</span> </span><span class="WHIT">		</span><span class="NAME">result.exptext</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getDisplayText</span><span class="PUNC">(</span><span class="NAME">hItem</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2032</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2033</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2034</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2035</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2036</span> 
<span class='line'>2037</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2038</span>      * get DisplayText ASN.1 structure parameter as JSON object
<span class='line'>2039</span>      * @name getDisplayText
<span class='line'>2040</span>      * @memberOf X509#
<span class='line'>2041</span>      * @function
<span class='line'>2042</span>      * @param {String} h hexadecimal string of DisplayText
<span class='line'>2043</span>      * @return {Object} JSON object of DisplayText parameters
<span class='line'>2044</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>2045</span>      * @see X509#getExtCertificatePolicies
<span class='line'>2046</span>      * @see X509#getPolicyInformation
<span class='line'>2047</span>      * @description
<span class='line'>2048</span>      * This method will get 
<span class='line'>2049</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.2.1.4">
<span class='line'>2050</span>      * DisplayText&lt;/a> parameters.
<span class='line'>2051</span>      * &lt;pre>
<span class='line'>2052</span>      * DisplayText ::= CHOICE {
<span class='line'>2053</span>      *      ia5String        IA5String      (SIZE (1..200)),
<span class='line'>2054</span>      *      visibleString    VisibleString  (SIZE (1..200)),
<span class='line'>2055</span>      *      bmpString        BMPString      (SIZE (1..200)),
<span class='line'>2056</span>      *      utf8String       UTF8String     (SIZE (1..200)) }     
<span class='line'>2057</span>      * &lt;/pre>
<span class='line'>2058</span>      * Result of this method can be passed to 
<span class='line'>2059</span>      * {@link KJUR.asn1.x509.DisplayText} constructor.
<span class='line'>2060</span>      * @example
<span class='line'>2061</span>      * x = new X509();
<span class='line'>2062</span>      * x.getDisplayText("0c03616161") &rarr {type: 'utf8', str: 'aaa'}
<span class='line'>2063</span>      * x.getDisplayText("1e03616161") &rarr {type: 'bmp',  str: 'aaa'}
<span class='line'>2064</span>      */</span><span class="WHIT">
<span class='line'>2065</span> </span><span class="WHIT">    </span><span class="NAME">this.getDisplayText</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2066</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_DISPLAYTEXTTAG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"0c"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"16"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"1a"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"vis"</span><span class="WHIT"> </span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"1e"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"bmp"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2067</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2068</span> </span><span class="WHIT">	</span><span class="NAME">result.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_DISPLAYTEXTTAG</span><span class="PUNC">[</span><span class="NAME">h.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2069</span> </span><span class="WHIT">	</span><span class="NAME">result.str</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextorstr</span><span class="PUNC">(</span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2070</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2071</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2072</span> 
<span class='line'>2073</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2074</span>      * get PolicyMappings extension value as JSON object&lt;br/>
<span class='line'>2075</span>      * @name getExtPolicyMappings
<span class='line'>2076</span>      * @memberOf X509#
<span class='line'>2077</span>      * @function
<span class='line'>2078</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>2079</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>2080</span>      * @return {Object} JSON object of PolicyMappings parameters or undefined
<span class='line'>2081</span>      * @since jsrsasign 10.6.1 x509 2.1.1
<span class='line'>2082</span>      * @see KJUR.asn1.x509.PolicyMappings
<span class='line'>2083</span>      *
<span class='line'>2084</span>      * @description
<span class='line'>2085</span>      * This method will get certificate policies value
<span class='line'>2086</span>      * as an array of JSON object which has properties defined
<span class='line'>2087</span>      * in {@link KJUR.asn1.x509.PolicyMappings}.
<span class='line'>2088</span>      * Result of this method can be passed to 
<span class='line'>2089</span>      * {@link KJUR.asn1.x509.PolicyMappings} constructor.
<span class='line'>2090</span>      * If there is no this extension in the certificate,
<span class='line'>2091</span>      * it returns undefined.
<span class='line'>2092</span>      * &lt;br>
<span class='line'>2093</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>2094</span>      * will be generated from them.
<span class='line'>2095</span>      * @example
<span class='line'>2096</span>      * x = new X509(sCertPEM);
<span class='line'>2097</span>      * x.getExtPolicyMappings() &rarr; 
<span class='line'>2098</span>      * { extname: "policyMappings",
<span class='line'>2099</span>      *   critical: true,
<span class='line'>2100</span>      *   array: [["1.2.3", "1.4.5"],["0.1.2", "anyPolicy"]]}
<span class='line'>2101</span>      */</span><span class="WHIT">
<span class='line'>2102</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtPolicyMappings</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2103</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getCriticalExtV</span><span class="PUNC">(</span><span class="STRN">"policyMappings"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2104</span> </span><span class="WHIT">	</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2105</span> </span><span class="WHIT">	</span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2106</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2107</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"policyMappings"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2108</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2109</span> 
<span class='line'>2110</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2111</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX_parse</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2112</span> </span><span class="WHIT">	    </span><span class="COMM">//result._asn1 = p;</span><span class="WHIT">
<span class='line'>2113</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPair</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p.seq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2114</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2115</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aPair.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2116</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aOid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPair</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">seq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2117</span> </span><span class="WHIT">		</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">aOid</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aOid</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2118</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2119</span> </span><span class="WHIT">	    </span><span class="NAME">result.array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2120</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2121</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"malformed policyMappings"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2122</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2123</span> 
<span class='line'>2124</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2125</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2126</span> 
<span class='line'>2127</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2128</span>      * get PolicyConstraints extension value as JSON object&lt;br/>
<span class='line'>2129</span>      * @name getExtPolicyConstraints
<span class='line'>2130</span>      * @memberOf X509#
<span class='line'>2131</span>      * @function
<span class='line'>2132</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>2133</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>2134</span>      * @return {Object} JSON object of PolicyConstraints parameters or undefined
<span class='line'>2135</span>      * @since jsrsasign 10.6.1 x509 2.1.1
<span class='line'>2136</span>      * @see KJUR.asn1.x509.PolicyConstraints
<span class='line'>2137</span>      *
<span class='line'>2138</span>      * @description
<span class='line'>2139</span>      * This method will get certificate policies value
<span class='line'>2140</span>      * as an array of JSON object which has properties defined
<span class='line'>2141</span>      * in {@link KJUR.asn1.x509.PolicyConstraints}.
<span class='line'>2142</span>      * Result of this method can be passed to 
<span class='line'>2143</span>      * {@link KJUR.asn1.x509.PolicyConstraints} constructor.
<span class='line'>2144</span>      * If there is no this extension in the certificate,
<span class='line'>2145</span>      * it returns undefined.
<span class='line'>2146</span>      * &lt;br>
<span class='line'>2147</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>2148</span>      * will be generated from them.
<span class='line'>2149</span>      * @example
<span class='line'>2150</span>      * x = new X509(sCertPEM);
<span class='line'>2151</span>      * x.getExtPolicyConstraints() &rarr; 
<span class='line'>2152</span>      * { extname: "policyConstraints",
<span class='line'>2153</span>      *   critical: true,
<span class='line'>2154</span>      *   reqexp: 3,
<span class='line'>2155</span>      *   inhibit: 3 }
<span class='line'>2156</span>      */</span><span class="WHIT">
<span class='line'>2157</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtPolicyConstraints</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2158</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getCriticalExtV</span><span class="PUNC">(</span><span class="STRN">"policyConstraints"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2159</span> </span><span class="WHIT">	</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2160</span> </span><span class="WHIT">	</span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2161</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2162</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"policyConstraints"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2163</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2164</span> 
<span class='line'>2165</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX_parse</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2166</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2167</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p.seq</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2168</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aItem.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2169</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pTag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aItem</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">tag</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2170</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pTag.explicit</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2171</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pTag.tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"80"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.reqexp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">pTag.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2172</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pTag.tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"81"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.inhibit</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">pTag.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2173</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2174</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2175</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"malformed policyConstraints value"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2176</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2177</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2178</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2179</span> 
<span class='line'>2180</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2181</span>      * get InhibitAnyPolicy extension value as JSON object&lt;br/>
<span class='line'>2182</span>      * @name getExtInhibitAnyPolicy
<span class='line'>2183</span>      * @memberOf X509#
<span class='line'>2184</span>      * @function
<span class='line'>2185</span>      * @param {String} hExtV hexadecimal string of extension value (OPTIONAL)
<span class='line'>2186</span>      * @param {Boolean} critical flag (OPTIONAL)
<span class='line'>2187</span>      * @return {Object} JSON object of InhibitAnyPolicy parameters or undefined
<span class='line'>2188</span>      * @since jsrsasign 10.6.1 x509 2.1.1
<span class='line'>2189</span>      * @see KJUR.asn1.x509.InhibitAnyPolicy
<span class='line'>2190</span>      *
<span class='line'>2191</span>      * @description
<span class='line'>2192</span>      * This method will get certificate policies value
<span class='line'>2193</span>      * as an array of JSON object which has properties defined
<span class='line'>2194</span>      * in {@link KJUR.asn1.x509.InhibitAnyPolicy}.
<span class='line'>2195</span>      * Result of this method can be passed to 
<span class='line'>2196</span>      * {@link KJUR.asn1.x509.InhibitAnyPolicy} constructor.
<span class='line'>2197</span>      * If there is no this extension in the certificate,
<span class='line'>2198</span>      * it returns undefined.
<span class='line'>2199</span>      * &lt;br>
<span class='line'>2200</span>      * When hExtV and critical specified as arguments, return value
<span class='line'>2201</span>      * will be generated from them.
<span class='line'>2202</span>      * @example
<span class='line'>2203</span>      * x = new X509(sCertPEM);
<span class='line'>2204</span>      * x.getExtInhibitAnyPolicy() &rarr; 
<span class='line'>2205</span>      * { extname: "policyConstraints",
<span class='line'>2206</span>      *   critical: true,
<span class='line'>2207</span>      *   skip: 3 }
<span class='line'>2208</span>      *
<span class='line'>2209</span>      * x.getExtInhibitAnyPolicy("020103", true) &rarr; same as above
<span class='line'>2210</span>      */</span><span class="WHIT">
<span class='line'>2211</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtInhibitAnyPolicy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2212</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getCriticalExtV</span><span class="PUNC">(</span><span class="STRN">"inhibitAnyPolicy"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2213</span> </span><span class="WHIT">	</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2214</span> </span><span class="WHIT">	</span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExtVCritical</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2215</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2216</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"inhibitAnyPolicy"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2217</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2218</span> 
<span class='line'>2219</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">skip</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getInt</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2220</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">skip</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"wrong value"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2221</span> </span><span class="WHIT">	</span><span class="NAME">result.skip</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">skip</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2222</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2223</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2224</span> 
<span class='line'>2225</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2226</span>      * parse cRLNumber CRL extension as JSON object&lt;br/>
<span class='line'>2227</span>      * @name getExtCRLNumber
<span class='line'>2228</span>      * @memberOf X509#
<span class='line'>2229</span>      * @function
<span class='line'>2230</span>      * @param {String} hExtV hexadecimal string of extension value
<span class='line'>2231</span>      * @param {Boolean} critical flag
<span class='line'>2232</span>      * @since jsrsasign 9.1.1 x509 2.0.1
<span class='line'>2233</span>      * @see KJUR.asn1.x509.CRLNumber
<span class='line'>2234</span>      * @see X509#getExtParamArray
<span class='line'>2235</span>      * @description
<span class='line'>2236</span>      * This method parses
<span class='line'>2237</span>      * CRLNumber CRL extension value defined in
<span class='line'>2238</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-5.2.3">
<span class='line'>2239</span>      * RFC 5280 5.2.3&lt;/a> as JSON object.
<span class='line'>2240</span>      * &lt;pre>
<span class='line'>2241</span>      * id-ce-cRLNumber OBJECT IDENTIFIER ::= { id-ce 20 }
<span class='line'>2242</span>      * CRLNumber ::= INTEGER (0..MAX)
<span class='line'>2243</span>      * &lt;/pre>
<span class='line'>2244</span>      * &lt;br/>
<span class='line'>2245</span>      * Result of this method can be passed to 
<span class='line'>2246</span>      * {@link KJUR.asn1.x509.CRLNumber} constructor.
<span class='line'>2247</span>      * @example
<span class='line'>2248</span>      * crl = X509CRL("-----BEGIN X509 CRL...");
<span class='line'>2249</span>      * ... get hExtV and critical flag ...
<span class='line'>2250</span>      * crl.getExtCRLNumber("02...", false) &rarr;
<span class='line'>2251</span>      * {extname: "cRLNumber", num: {hex: "12af"}}
<span class='line'>2252</span>      */</span><span class="WHIT">
<span class='line'>2253</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtCRLNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2254</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"cRLNumber"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2255</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2256</span> 
<span class='line'>2257</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"02"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2258</span> </span><span class="WHIT">	    </span><span class="NAME">result.num</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2259</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2260</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2261</span> </span><span class="WHIT">	</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">_Error</span><span class="PUNC">(</span><span class="STRN">"hExtV parse error: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2262</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2263</span> 
<span class='line'>2264</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2265</span>      * parse cRLReason CRL entry extension as JSON object&lt;br/>
<span class='line'>2266</span>      * @name getExtCRLReason
<span class='line'>2267</span>      * @memberOf X509#
<span class='line'>2268</span>      * @function
<span class='line'>2269</span>      * @param {String} hExtV hexadecimal string of extension value
<span class='line'>2270</span>      * @param {Boolean} critical flag
<span class='line'>2271</span>      * @since jsrsasign 9.1.1 x509 2.0.1
<span class='line'>2272</span>      * @see KJUR.asn1.x509.CRLReason
<span class='line'>2273</span>      * @see X509#getExtParamArray
<span class='line'>2274</span>      * @description
<span class='line'>2275</span>      * This method parses
<span class='line'>2276</span>      * CRLReason CRL entry extension value defined in
<span class='line'>2277</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-5.3.1">
<span class='line'>2278</span>      * RFC 5280 5.3.1&lt;/a> as JSON object.
<span class='line'>2279</span>      * &lt;pre>
<span class='line'>2280</span>      * id-ce-cRLReasons OBJECT IDENTIFIER ::= { id-ce 21 }
<span class='line'>2281</span>      * -- reasonCode ::= { CRLReason }
<span class='line'>2282</span>      * CRLReason ::= ENUMERATED {
<span class='line'>2283</span>      *      unspecified             (0),
<span class='line'>2284</span>      *      keyCompromise           (1),
<span class='line'>2285</span>      *      cACompromise            (2),
<span class='line'>2286</span>      *      affiliationChanged      (3),
<span class='line'>2287</span>      *      superseded              (4),
<span class='line'>2288</span>      *      cessationOfOperation    (5),
<span class='line'>2289</span>      *      certificateHold         (6),
<span class='line'>2290</span>      *      removeFromCRL           (8),
<span class='line'>2291</span>      *      privilegeWithdrawn      (9),
<span class='line'>2292</span>      *      aACompromise           (10) }
<span class='line'>2293</span>      * &lt;/pre>
<span class='line'>2294</span>      * &lt;br/>
<span class='line'>2295</span>      * Result of this method can be passed to 
<span class='line'>2296</span>      * {@link KJUR.asn1.x509.CRLReason} constructor.
<span class='line'>2297</span>      * @example
<span class='line'>2298</span>      * crl = X509CRL("-----BEGIN X509 CRL...");
<span class='line'>2299</span>      * ... get hExtV and critical flag ...
<span class='line'>2300</span>      * crl.getExtCRLReason("02...", false) &rarr;
<span class='line'>2301</span>      * {extname: "cRLReason", code: 3}
<span class='line'>2302</span>      */</span><span class="WHIT">
<span class='line'>2303</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtCRLReason</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2304</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"cRLReason"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2305</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2306</span> 
<span class='line'>2307</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV.substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"0a"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2308</span> </span><span class="WHIT">	    </span><span class="NAME">result.code</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2309</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2310</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2311</span> </span><span class="WHIT">	</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"hExtV parse error: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2312</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2313</span> 
<span class='line'>2314</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2315</span>      * parse OCSPNonce OCSP extension as JSON object&lt;br/>
<span class='line'>2316</span>      * @name getExtOcspNonce
<span class='line'>2317</span>      * @memberOf X509#
<span class='line'>2318</span>      * @function
<span class='line'>2319</span>      * @param {String} hExtV hexadecimal string of extension value
<span class='line'>2320</span>      * @param {Boolean} critical flag
<span class='line'>2321</span>      * @return {Array} JSON object of parsed OCSPNonce extension
<span class='line'>2322</span>      * @since jsrsasign 9.1.6 x509 2.0.3
<span class='line'>2323</span>      * @see KJUR.asn1.x509.OCSPNonce
<span class='line'>2324</span>      * @see X509#getExtParamArray
<span class='line'>2325</span>      * @see X509#getExtParam
<span class='line'>2326</span>      * @description
<span class='line'>2327</span>      * This method parses
<span class='line'>2328</span>      * Nonce OCSP extension value defined in
<span class='line'>2329</span>      * &lt;a href="https://tools.ietf.org/html/rfc6960#section-4.4.1">
<span class='line'>2330</span>      * RFC 6960 4.4.1&lt;/a> as JSON object.
<span class='line'>2331</span>      * &lt;pre>
<span class='line'>2332</span>      * id-pkix-ocsp           OBJECT IDENTIFIER ::= { id-ad-ocsp }
<span class='line'>2333</span>      * id-pkix-ocsp-nonce     OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 }
<span class='line'>2334</span>      * Nonce ::= OCTET STRING
<span class='line'>2335</span>      * &lt;/pre>
<span class='line'>2336</span>      * &lt;br/>
<span class='line'>2337</span>      * Result of this method can be passed to 
<span class='line'>2338</span>      * {@link KJUR.asn1.x509.OCSPNonce} constructor.
<span class='line'>2339</span>      * @example
<span class='line'>2340</span>      * x = new X509();
<span class='line'>2341</span>      * x.getExtOcspNonce(&lt;&lt;extn hex value >>) &rarr;
<span class='line'>2342</span>      * { extname: "ocspNonce", hex: "1a2b..." }
<span class='line'>2343</span>      */</span><span class="WHIT">
<span class='line'>2344</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtOcspNonce</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2345</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"ocspNonce"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2346</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2347</span> 
<span class='line'>2348</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hNonce</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2349</span> </span><span class="WHIT">	</span><span class="NAME">result.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hNonce</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2350</span> 
<span class='line'>2351</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2352</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2353</span> 
<span class='line'>2354</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2355</span>      * parse OCSPNoCheck OCSP extension as JSON object&lt;br/>
<span class='line'>2356</span>      * @name getExtOcspNoCheck
<span class='line'>2357</span>      * @memberOf X509#
<span class='line'>2358</span>      * @function
<span class='line'>2359</span>      * @param {String} hExtV hexadecimal string of extension value
<span class='line'>2360</span>      * @param {Boolean} critical flag
<span class='line'>2361</span>      * @return {Array} JSON object of parsed OCSPNoCheck extension
<span class='line'>2362</span>      * @since jsrsasign 9.1.6 x509 2.0.3
<span class='line'>2363</span>      * @see KJUR.asn1.x509.OCSPNoCheck
<span class='line'>2364</span>      * @see X509#getExtParamArray
<span class='line'>2365</span>      * @see X509#getExtParam
<span class='line'>2366</span>      * @description
<span class='line'>2367</span>      * This method parses
<span class='line'>2368</span>      * OCSPNoCheck extension value defined in
<span class='line'>2369</span>      * &lt;a href="https://tools.ietf.org/html/rfc6960#section-4.2.2.2.1">
<span class='line'>2370</span>      * RFC 6960 4.2.2.2.1&lt;/a> as JSON object.
<span class='line'>2371</span>      * &lt;pre>
<span class='line'>2372</span>      * id-pkix-ocsp-nocheck OBJECT IDENTIFIER ::= { id-pkix-ocsp 5 }
<span class='line'>2373</span>      * &lt;/pre>
<span class='line'>2374</span>      * &lt;br/>
<span class='line'>2375</span>      * Result of this method can be passed to 
<span class='line'>2376</span>      * {@link KJUR.asn1.x509.OCSPNoCheck} constructor.
<span class='line'>2377</span>      * @example
<span class='line'>2378</span>      * x = new X509();
<span class='line'>2379</span>      * x.getExtOcspNoCheck(&lt;&lt;extn hex value >>) &rarr;
<span class='line'>2380</span>      * { extname: "ocspNoCheck" }
<span class='line'>2381</span>      */</span><span class="WHIT">
<span class='line'>2382</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtOcspNoCheck</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2383</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"ocspNoCheck"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2384</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2385</span> 
<span class='line'>2386</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2387</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2388</span> 
<span class='line'>2389</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2390</span>      * parse AdobeTimeStamp extension as JSON object&lt;br/>
<span class='line'>2391</span>      * @name getExtAdobeTimeStamp
<span class='line'>2392</span>      * @memberOf X509#
<span class='line'>2393</span>      * @function
<span class='line'>2394</span>      * @param {String} hExtV hexadecimal string of extension value
<span class='line'>2395</span>      * @param {Boolean} critical flag
<span class='line'>2396</span>      * @return {Array} JSON object of parsed AdobeTimeStamp extension
<span class='line'>2397</span>      * @since jsrsasign 10.0.1 x509 2.0.5
<span class='line'>2398</span>      * @see KJUR.asn1.x509.AdobeTimeStamp
<span class='line'>2399</span>      * @see X509#getExtParamArray
<span class='line'>2400</span>      * @see X509#getExtParam
<span class='line'>2401</span>      * @description
<span class='line'>2402</span>      * This method parses
<span class='line'>2403</span>      * X.509v3 AdobeTimeStamp private extension value defined in the
<span class='line'>2404</span>      * &lt;a href="https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSigDC/oids.html">
<span class='line'>2405</span>      * Adobe site&lt;/a> as JSON object.
<span class='line'>2406</span>      * This extension provides the URL location for time stamp service.
<span class='line'>2407</span>      * &lt;pre>
<span class='line'>2408</span>      * adbe- OBJECT IDENTIFIER ::=  { adbe(1.2.840.113583) acrobat(1) security(1) x509Ext(9) 1 }
<span class='line'>2409</span>      *  ::= SEQUENCE {
<span class='line'>2410</span>      *     version INTEGER  { v1(1) }, -- extension version
<span class='line'>2411</span>      *     location GeneralName (In v1 GeneralName can be only uniformResourceIdentifier)
<span class='line'>2412</span>      *     requiresAuth        boolean (default false), OPTIONAL }
<span class='line'>2413</span>      * &lt;/pre>
<span class='line'>2414</span>      * &lt;br/>
<span class='line'>2415</span>      * Result of this method can be passed to 
<span class='line'>2416</span>      * {@link KJUR.asn1.x509.AdobeTimeStamp} constructor.
<span class='line'>2417</span>      * &lt;br/>
<span class='line'>2418</span>      * NOTE: This extesion doesn't seem to have official name. This may be called as "pdfTimeStamp".
<span class='line'>2419</span>      * @example
<span class='line'>2420</span>      * x.getExtAdobeTimeStamp(&lt;&lt;extn hex value >>) &rarr;
<span class='line'>2421</span>      * { extname: "adobeTimeStamp", uri: "http://tsa.example.com/" reqauth: true }
<span class='line'>2422</span>      */</span><span class="WHIT">
<span class='line'>2423</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtAdobeTimeStamp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2424</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2425</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInfo</span><span class="PUNC">(</span><span class="STRN">"adobeTimeStamp"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2426</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2427</span> </span><span class="WHIT">	    </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">info.vidx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2428</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info.critical</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2429</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2430</span> 
<span class='line'>2431</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">extname</span><span class="PUNC">:</span><span class="STRN">"adobeTimeStamp"</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2432</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2433</span> 
<span class='line'>2434</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2435</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2436</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hGN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2437</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">gnParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getGeneralName</span><span class="PUNC">(</span><span class="NAME">hGN</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2438</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">gnParam.uri</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2439</span> </span><span class="WHIT">		</span><span class="NAME">result.uri</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">gnParam.uri</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2440</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2441</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2442</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2443</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hBool</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2444</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hBool</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"0101ff"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.reqauth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2445</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hBool</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"010100"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.reqauth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2446</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2447</span> 
<span class='line'>2448</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2449</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2450</span> 
<span class='line'>2451</span> </span><span class="WHIT">    </span><span class="COMM">// ===== BEGIN X500Name related =====================================</span><span class="WHIT">
<span class='line'>2452</span> </span><span class="WHIT">    </span><span class="COMM">/*
<span class='line'>2453</span>      * convert ASN.1 parsed object to attrTypeAndValue assoc array&lt;br/>
<span class='line'>2454</span>      * @name _convATV
<span class='line'>2455</span>      * @param p associative array of parsed attrTypeAndValue object
<span class='line'>2456</span>      * @return attrTypeAndValue associative array
<span class='line'>2457</span>      * @since jsrsasign 10.5.12 x509 2.0.14
<span class='line'>2458</span>      * @example
<span class='line'>2459</span>      * _convATV({seq: [...]} &rarr: {type:"C",value:"JP",ds:"prn"}
<span class='line'>2460</span>      */</span><span class="WHIT">
<span class='line'>2461</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_convATV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2462</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2463</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2464</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p.seq</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">oid</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2465</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.name2oid</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2466</span> </span><span class="WHIT">	    </span><span class="NAME">result.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.oid2atype</span><span class="PUNC">(</span><span class="NAME">oid</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2467</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">item1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">p.seq</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2468</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item1.utf8str</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2469</span> </span><span class="WHIT">		</span><span class="NAME">result.ds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2470</span> </span><span class="WHIT">		</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item1.utf8str.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2471</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item1.numstr</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2472</span> </span><span class="WHIT">		</span><span class="NAME">result.ds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"num"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2473</span> </span><span class="WHIT">		</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item1.numstr.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2474</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item1.telstr</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2475</span> </span><span class="WHIT">		</span><span class="NAME">result.ds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"tel"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2476</span> </span><span class="WHIT">		</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item1.telstr.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2477</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item1.prnstr</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2478</span> </span><span class="WHIT">		</span><span class="NAME">result.ds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2479</span> </span><span class="WHIT">		</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item1.prnstr.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2480</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item1.ia5str</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2481</span> </span><span class="WHIT">		</span><span class="NAME">result.ds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2482</span> </span><span class="WHIT">		</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item1.ia5str.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2483</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item1.visstr</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2484</span> </span><span class="WHIT">		</span><span class="NAME">result.ds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"vis"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2485</span> </span><span class="WHIT">		</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item1.visstr.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2486</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">item1.bmpstr</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2487</span> </span><span class="WHIT">		</span><span class="NAME">result.ds</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"bmp"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2488</span> </span><span class="WHIT">		</span><span class="NAME">result.value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item1.bmpstr.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2489</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2490</span> </span><span class="WHIT">		</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"error"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2491</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2492</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2493</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2494</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Erorr</span><span class="PUNC">(</span><span class="STRN">"improper ASN.1 parsed AttrTypeAndValue"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2495</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2496</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2497</span> 
<span class='line'>2498</span> </span><span class="WHIT">    </span><span class="COMM">/*
<span class='line'>2499</span>      * convert ASN.1 parsed object to RDN array&lt;br/>
<span class='line'>2500</span>      * @name _convRDN
<span class='line'>2501</span>      * @param p associative array of parsed RDN object
<span class='line'>2502</span>      * @return RDN array
<span class='line'>2503</span>      * @since jsrsasign 10.5.12 x509 2.0.14
<span class='line'>2504</span>      * @example
<span class='line'>2505</span>      * _convRDN({set: [...]} &rarr: [{type:"C",value:"JP",ds:"prn"}]
<span class='line'>2506</span>      */</span><span class="WHIT">
<span class='line'>2507</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_convRDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2508</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2509</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">p.set.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">pATV</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_convATV</span><span class="PUNC">(</span><span class="NAME">pATV</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2510</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2511</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"improper ASN.1 parsed RDN: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">ex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2512</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2513</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2514</span> 
<span class='line'>2515</span> </span><span class="WHIT">    </span><span class="COMM">/*
<span class='line'>2516</span>      * convert ASN.1 parsed object to X500Name array&lt;br/>
<span class='line'>2517</span>      * @name _convX500Name
<span class='line'>2518</span>      * @param p associative array of parsed X500Name array object
<span class='line'>2519</span>      * @return RDN array
<span class='line'>2520</span>      * @since jsrsasign 10.5.12 x509 2.0.14
<span class='line'>2521</span>      * @example
<span class='line'>2522</span>      * _convX500Name({seq: [...]} &rarr: [[{type:"C",value:"JP",ds:"prn"}]]
<span class='line'>2523</span>      */</span><span class="WHIT">
<span class='line'>2524</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_convX500Name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2525</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2526</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">p.seq.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">pRDN</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_convRDN</span><span class="PUNC">(</span><span class="NAME">pRDN</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2527</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2528</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"improper ASN.1 parsed X500Name: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">ex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2529</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2530</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2531</span> 
<span class='line'>2532</span> </span><span class="WHIT">    </span><span class="NAME">this.getX500NameRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aDN</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2533</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isPRNRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2534</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isUTF8Rule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2535</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isMixedRule</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2536</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">logfull</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2537</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">logcheck</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2538</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lasttag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2539</span> 
<span class='line'>2540</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2541</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aDN.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2542</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aRDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aDN</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2543</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aRDN.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2544</span> </span><span class="WHIT">		</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">aRDN</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2545</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2546</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2547</span> 
<span class='line'>2548</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2549</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">item</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2550</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item.ds</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2551</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item.value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2552</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item.type</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2553</span> </span><span class="WHIT">	    </span><span class="NAME">logfull</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2554</span> </span><span class="WHIT">	    
<span class='line'>2555</span> 	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"utf8"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2556</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"mixed"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2557</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2558</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"ia5"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2559</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"CN"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2560</span> </span><span class="WHIT">		    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"mixed"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2561</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2562</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="WHIT"> </span><span class="NAME">KJUR.lang.String.isMail</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2563</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"mixed"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2564</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2565</span> </span><span class="WHIT">			</span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2566</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2567</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2568</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2569</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"C"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2570</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2571</span> </span><span class="WHIT">		    </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2572</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2573</span> </span><span class="WHIT">		    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"mixed"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2574</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2575</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2576</span> </span><span class="WHIT">	    </span><span class="NAME">logcheck</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2577</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lasttag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2578</span> </span><span class="WHIT">		</span><span class="NAME">lasttag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2579</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2580</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lasttag</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"mixed"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2581</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2582</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2583</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">lasttag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2584</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"prn"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2585</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2586</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">lasttag</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2587</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2588</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2589</span> 
<span class='line'>2590</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2591</span>      * get AttributeTypeAndValue ASN.1 structure parameter as JSON object&lt;br/>
<span class='line'>2592</span>      * @name getAttrTypeAndValue
<span class='line'>2593</span>      * @memberOf X509#
<span class='line'>2594</span>      * @function
<span class='line'>2595</span>      * @param {String} h hexadecimal string of AttributeTypeAndValue
<span class='line'>2596</span>      * @return {Object} JSON object of AttributeTypeAndValue parameters
<span class='line'>2597</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>2598</span>      * @see X509#getX500Name
<span class='line'>2599</span>      * @see X509#getRDN
<span class='line'>2600</span>      * @description
<span class='line'>2601</span>      * This method will get AttributeTypeAndValue parameters defined in
<span class='line'>2602</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.4">
<span class='line'>2603</span>      * RFC 5280 4.1.2.4&lt;/a>.
<span class='line'>2604</span>      * &lt;pre>
<span class='line'>2605</span>      * AttributeTypeAndValue ::= SEQUENCE {
<span class='line'>2606</span>      *   type     AttributeType,
<span class='line'>2607</span>      *   value    AttributeValue }
<span class='line'>2608</span>      * AttributeType ::= OBJECT IDENTIFIER
<span class='line'>2609</span>      * AttributeValue ::= ANY -- DEFINED BY AttributeType
<span class='line'>2610</span>      * &lt;/pre>
<span class='line'>2611</span>      * &lt;ul>
<span class='line'>2612</span>      * &lt;li>{String}type - AttributeType name or OID(ex. C,O,CN)&lt;/li>
<span class='line'>2613</span>      * &lt;li>{String}value - raw string of ASN.1 value of AttributeValue&lt;/li>
<span class='line'>2614</span>      * &lt;li>{String}ds - DirectoryString type of AttributeValue&lt;/li>
<span class='line'>2615</span>      * &lt;/ul>
<span class='line'>2616</span>      * "ds" has one of following value:
<span class='line'>2617</span>      * &lt;ul>
<span class='line'>2618</span>      * &lt;li>utf8 - (0x0c) UTF8String&lt;/li>
<span class='line'>2619</span>      * &lt;li>num  - (0x12) NumericString&lt;/li>
<span class='line'>2620</span>      * &lt;li>prn  - (0x13) PrintableString&lt;/li>
<span class='line'>2621</span>      * &lt;li>tel  - (0x14) TeletexString&lt;/li>
<span class='line'>2622</span>      * &lt;li>ia5  - (0x16) IA5String&lt;/li>
<span class='line'>2623</span>      * &lt;li>vis  - (0x1a) VisibleString&lt;/li>
<span class='line'>2624</span>      * &lt;li>bmp  - (0x1e) BMPString&lt;/li>
<span class='line'>2625</span>      * &lt;/ul>
<span class='line'>2626</span>      * @example
<span class='line'>2627</span>      * x = new X509();
<span class='line'>2628</span>      * x.getAttrTypeAndValue("30...") &rarr;
<span class='line'>2629</span>      * {type:"CN",value:"john.smith@example.com",ds:"ia5"} or
<span class='line'>2630</span>      * {type:"O",value:"Sample Corp.",ds:"prn"}
<span class='line'>2631</span>      */</span><span class="WHIT">
<span class='line'>2632</span> </span><span class="WHIT">    </span><span class="COMM">// unv  - (0x1c??) UniversalString ... for future</span><span class="WHIT">
<span class='line'>2633</span> </span><span class="WHIT">    </span><span class="NAME">this.getAttrTypeAndValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2634</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX_parse</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2635</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_convATV</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2636</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2637</span> 
<span class='line'>2638</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2639</span>      * get RelativeDistinguishedName ASN.1 structure parameter array&lt;br/>
<span class='line'>2640</span>      * @name getRDN
<span class='line'>2641</span>      * @memberOf X509#
<span class='line'>2642</span>      * @function
<span class='line'>2643</span>      * @param {String} h hexadecimal string of RDN
<span class='line'>2644</span>      * @return {Array} array of AttrTypeAndValue parameters
<span class='line'>2645</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>2646</span>      * @see X509#getX500Name
<span class='line'>2647</span>      * @see X509#getRDN
<span class='line'>2648</span>      * @see X509#getAttrTypeAndValue
<span class='line'>2649</span>      * @description
<span class='line'>2650</span>      * This method will get RelativeDistinguishedName parameters defined in
<span class='line'>2651</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.4">
<span class='line'>2652</span>      * RFC 5280 4.1.2.4&lt;/a>.
<span class='line'>2653</span>      * &lt;pre>
<span class='line'>2654</span>      * RelativeDistinguishedName ::=
<span class='line'>2655</span>      *   SET SIZE (1..MAX) OF AttributeTypeAndValue
<span class='line'>2656</span>      * &lt;/pre>
<span class='line'>2657</span>      * @example
<span class='line'>2658</span>      * x = new X509();
<span class='line'>2659</span>      * x.getRDN("31...") &rarr;
<span class='line'>2660</span>      * [{type:"C",value:"US",ds:"prn"}] or
<span class='line'>2661</span>      * [{type:"O",value:"Sample Corp.",ds:"prn"}] or
<span class='line'>2662</span>      * [{type:"CN",value:"john.smith@example.com",ds:"ia5"}]
<span class='line'>2663</span>      */</span><span class="WHIT">
<span class='line'>2664</span> </span><span class="WHIT">    </span><span class="NAME">this.getRDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2665</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX_parse</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2666</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_convRDN</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2667</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2668</span> 
<span class='line'>2669</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2670</span>      * get X.500 Name ASN.1 structure parameter array&lt;br/>
<span class='line'>2671</span>      * @name getX500NameArray
<span class='line'>2672</span>      * @memberOf X509#
<span class='line'>2673</span>      * @function
<span class='line'>2674</span>      * @param {String} h hexadecimal string of Name
<span class='line'>2675</span>      * @return {Array} array of RDN parameter array
<span class='line'>2676</span>      * @since jsrsasign 10.0.6 x509 2.0.9
<span class='line'>2677</span>      * @see X509#getX500Name
<span class='line'>2678</span>      * @see X509#getRDN
<span class='line'>2679</span>      * @see X509#getAttrTypeAndValue
<span class='line'>2680</span>      * @description
<span class='line'>2681</span>      * This method will get Name parameter defined in
<span class='line'>2682</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.4">
<span class='line'>2683</span>      * RFC 5280 4.1.2.4&lt;/a>.
<span class='line'>2684</span>      * &lt;pre>
<span class='line'>2685</span>      * Name ::= CHOICE { -- only one possibility for now --
<span class='line'>2686</span>      *   rdnSequence  RDNSequence }
<span class='line'>2687</span>      * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
<span class='line'>2688</span>      * &lt;/pre>
<span class='line'>2689</span>      * @example
<span class='line'>2690</span>      * x = new X509();
<span class='line'>2691</span>      * x.getX500NameArray("30...") &rarr;
<span class='line'>2692</span>      * [[{type:"C",value:"US",ds:"prn"}],
<span class='line'>2693</span>      *  [{type:"O",value:"Sample Corp.",ds:"utf8"}],
<span class='line'>2694</span>      *  [{type:"CN",value:"john.smith@example.com",ds:"ia5"}]]
<span class='line'>2695</span>      */</span><span class="WHIT">
<span class='line'>2696</span> </span><span class="WHIT">    </span><span class="NAME">this.getX500NameArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2697</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX_parse</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2698</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_convX500Name</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2699</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2700</span> 
<span class='line'>2701</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2702</span>      * get Name ASN.1 structure parameter array&lt;br/>
<span class='line'>2703</span>      * @name getX500Name
<span class='line'>2704</span>      * @memberOf X509#
<span class='line'>2705</span>      * @function
<span class='line'>2706</span>      * @param {String} h hexadecimal string of Name
<span class='line'>2707</span>      * @param {boolean} flagCanon flag to conclude canonicalized name (DEFAULT false)
<span class='line'>2708</span>      * @param {boolean} flagHex flag to conclude hexadecimal string (DEFAULT false)
<span class='line'>2709</span>      * @return {Array} array of RDN parameter array
<span class='line'>2710</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>2711</span>      * @see X509#getX500NameArray
<span class='line'>2712</span>      * @see X509#getRDN
<span class='line'>2713</span>      * @see X509#getAttrTypeAndValue
<span class='line'>2714</span>      * @see X509#c14nRDNArray
<span class='line'>2715</span>      * @see KJUR.asn1.x509.X500Name
<span class='line'>2716</span>      * @see KJUR.asn1.x509.GeneralName
<span class='line'>2717</span>      * @see KJUR.asn1.x509.GeneralNames
<span class='line'>2718</span>      *
<span class='line'>2719</span>      * @description
<span class='line'>2720</span>      * This method will get Name parameter defined in
<span class='line'>2721</span>      * &lt;a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.4">
<span class='line'>2722</span>      * RFC 5280 4.1.2.4&lt;/a>.
<span class='line'>2723</span>      * &lt;pre>
<span class='line'>2724</span>      * Name ::= CHOICE { -- only one possibility for now --
<span class='line'>2725</span>      *   rdnSequence  RDNSequence }
<span class='line'>2726</span>      * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
<span class='line'>2727</span>      * &lt;/pre>
<span class='line'>2728</span>      * &lt;br>
<span class='line'>2729</span>      * NOTE: From jsrsasign 10.6.0, flagHex and flagCanon has been 
<span class='line'>2730</span>      * supported to conclude a canonicalized name for caseIgnoreMatch
<span class='line'>2731</span>      * desribed in &lt;a href="https://tools.ietf.org/html/rfc4518">
<span class='line'>2732</span>      * RFC 4518&lt;/a>.
<span class='line'>2733</span>      *
<span class='line'>2734</span>      * @example
<span class='line'>2735</span>      * x = new X509();
<span class='line'>2736</span>      * x.getX500Name("30...") &rarr;
<span class='line'>2737</span>      * { array: [
<span class='line'>2738</span>      *     [{type:"C",value:"US",ds:"prn"}],
<span class='line'>2739</span>      *     [{type:"O",value:"Sample Corp.",ds:"utf8"}],
<span class='line'>2740</span>      *     [{type:"CN",value:"john.smith@example.com",ds:"ia5"}]
<span class='line'>2741</span>      *   ],
<span class='line'>2742</span>      *   str: "/C=US/O=Sample Corp./CN=john.smith@example.com",
<span class='line'>2743</span>      *   hex: "30..." }
<span class='line'>2744</span>      *
<span class='line'>2745</span>      * x.getX500Name("30...", true) &rarr;
<span class='line'>2746</span>      * { array: [
<span class='line'>2747</span>      *     [{type:"C",value:"US",ds:"prn"}],
<span class='line'>2748</span>      *     [{type:"O",value:"Sample    Corp.",ds:"utf8"}]
<span class='line'>2749</span>      *   ],
<span class='line'>2750</span>      *   str: "/C=US/O=Sample    Corp.",
<span class='line'>2751</span>      *   canon: "/c=us/o=sample corp.",
<span class='line'>2752</span>      *   hex: "30..." }
<span class='line'>2753</span>      */</span><span class="WHIT">
<span class='line'>2754</span> </span><span class="WHIT">    </span><span class="NAME">this.getX500Name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagCanon</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">flagHex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2755</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getX500NameArray</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2756</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.dnarraytostr</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2757</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2758</span> 
<span class='line'>2759</span> </span><span class="WHIT">	</span><span class="NAME">result.array</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2760</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">flagHex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2761</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">flagCanon</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.canon</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.c14nRDNArray</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2762</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2763</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2764</span> 
<span class='line'>2765</span> </span><span class="WHIT">    </span><span class="COMM">// ===== END X500Name related =====================================</span><span class="WHIT">
<span class='line'>2766</span> 
<span class='line'>2767</span> </span><span class="WHIT">    </span><span class="COMM">// ===== BEGIN read certificate =====================================</span><span class="WHIT">
<span class='line'>2768</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2769</span>      * read PEM formatted X.509 certificate from string.&lt;br/>
<span class='line'>2770</span>      * @name readCertPEM
<span class='line'>2771</span>      * @memberOf X509#
<span class='line'>2772</span>      * @function
<span class='line'>2773</span>      * @param {String} sCertPEM string for PEM formatted X.509 certificate
<span class='line'>2774</span>      * @example
<span class='line'>2775</span>      * x = new X509();
<span class='line'>2776</span>      * x.readCertPEM(sCertPEM); // read certificate
<span class='line'>2777</span>      */</span><span class="WHIT">
<span class='line'>2778</span> </span><span class="WHIT">    </span><span class="NAME">this.readCertPEM</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sCertPEM</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2779</span> </span><span class="WHIT">        </span><span class="NAME">this.readCertHex</span><span class="PUNC">(</span><span class="NAME">_pemtohex</span><span class="PUNC">(</span><span class="NAME">sCertPEM</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2780</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2781</span> 
<span class='line'>2782</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2783</span>      * read a hexadecimal string of X.509 certificate&lt;br/>
<span class='line'>2784</span>      * @name readCertHex
<span class='line'>2785</span>      * @memberOf X509#
<span class='line'>2786</span>      * @function
<span class='line'>2787</span>      * @param {String} sCertHex hexadecimal string of X.509 certificate
<span class='line'>2788</span>      * @since jsrsasign 7.1.4 x509 1.1.13
<span class='line'>2789</span>      * @description
<span class='line'>2790</span>      * NOTE: {@link X509#parseExt} will called internally since jsrsasign 7.2.0.
<span class='line'>2791</span>      * @example
<span class='line'>2792</span>      * x = new X509();
<span class='line'>2793</span>      * x.readCertHex("3082..."); // read certificate
<span class='line'>2794</span>      */</span><span class="WHIT">
<span class='line'>2795</span> </span><span class="WHIT">    </span><span class="NAME">this.readCertHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sCertHex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2796</span> </span><span class="WHIT">        </span><span class="NAME">this.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sCertHex</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2797</span> </span><span class="WHIT">	</span><span class="NAME">this.getVersion</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// set version parameter</span><span class="WHIT">
<span class='line'>2798</span> 
<span class='line'>2799</span> </span><span class="WHIT">	</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2800</span> </span><span class="WHIT">	    </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">7</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"a3"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// has [3] v3ext</span><span class="WHIT">
<span class='line'>2801</span> </span><span class="WHIT">	    </span><span class="NAME">this.parseExt</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2802</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2803</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2804</span> 
<span class='line'>2805</span> </span><span class="WHIT">    </span><span class="COMM">// ===== END read certificate =====================================</span><span class="WHIT">
<span class='line'>2806</span> 
<span class='line'>2807</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>2808</span>      * get JSON object of certificate parameters&lt;br/>
<span class='line'>2809</span>      * @name getParam
<span class='line'>2810</span>      * @memberOf X509#
<span class='line'>2811</span>      * @function
<span class='line'>2812</span>      * @param {Object} option optional setting for return object
<span class='line'>2813</span>      * @return {Object} JSON object of certificate parameters
<span class='line'>2814</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>2815</span>      * @see KJUR.asn1.x509.X509Util.newCertPEM
<span class='line'>2816</span>      *
<span class='line'>2817</span>      * @description
<span class='line'>2818</span>      * This method returns a JSON object of the certificate
<span class='line'>2819</span>      * parameters. Return value can be passed to
<span class='line'>2820</span>      * {@link KJUR.asn1.x509.X509Util.newCertPEM}.
<span class='line'>2821</span>      * &lt;br/>
<span class='line'>2822</span>      * NOTE1: From jsrsasign 10.5.16, optional argument can be applied.
<span class='line'>2823</span>      * It can have following members:
<span class='line'>2824</span>      * &lt;ul>
<span class='line'>2825</span>      * &lt;li>tbshex - (boolean) tbshex member with hex value of 
<span class='line'>2826</span>      * tbsCertificate will be added if true (DEFAULT undefined)&lt;/li>
<span class='line'>2827</span>      * &lt;li>nodnarray - (boolean) array member for subject and
<span class='line'>2828</span>      * issuer will be deleted to simplify it if true (DEFAULT undefined)&lt;li>
<span class='line'>2829</span>      * &lt;li>dncanon - (boolean) add canon member to subject and issuer for DN StringPrep if true(DEFAULT undefined)&lt;/li>
<span class='line'>2830</span>      * &lt;li>dnhex - (boolean) add hex member to subject and issuer if true(DEFAULT undefined)&lt;/li>
<span class='line'>2831</span>      * &lt;/ul>
<span class='line'>2832</span>      * &lt;br/>
<span class='line'>2833</span>      * NOTE2: From jsrsasign 10.6.0, member "dncanon" and "dnhex" supported
<span class='line'>2834</span>      * in the "option" argument.
<span class='line'>2835</span>      *
<span class='line'>2836</span>      * @example
<span class='line'>2837</span>      * x = new X509();
<span class='line'>2838</span>      * x.readCertPEM("-----BEGIN CERTIFICATE...");
<span class='line'>2839</span>      * x.getParam() &rarr;
<span class='line'>2840</span>      * {version:3,
<span class='line'>2841</span>      *  serial:{hex:"12ab"},
<span class='line'>2842</span>      *  sigalg:"SHA256withRSA",
<span class='line'>2843</span>      *  issuer: {array:[[{type:'CN',value:'CA1',ds:'prn'}]],str:"/O=CA1"},
<span class='line'>2844</span>      *  notbefore:"160403023700Z",
<span class='line'>2845</span>      *  notafter:"160702023700Z",
<span class='line'>2846</span>      *  subject: {array:[[{type:'CN',value:'Test1',ds:'prn'}]],str:"/CN=Test1"},
<span class='line'>2847</span>      *  sbjpubkey:"-----BEGIN PUBLIC KEY...",
<span class='line'>2848</span>      *  ext:[
<span class='line'>2849</span>      *   {extname:"keyUsage",critical:true,names:["digitalSignature"]},
<span class='line'>2850</span>      *   {extname:"basicConstraints",critical:true},
<span class='line'>2851</span>      *   {extname:"subjectKeyIdentifier",kid:{hex:"f2eb..."}},
<span class='line'>2852</span>      *   {extname:"authorityKeyIdentifier",kid:{hex:"12ab..."}},
<span class='line'>2853</span>      *   {extname:"authorityInfoAccess",array:[{ocsp:"http://ocsp.example.com/"}]},
<span class='line'>2854</span>      *   {extname:"certificatePolicies",array:[{policyoid:"2.23.140.1.2.1"}]}
<span class='line'>2855</span>      *  ],
<span class='line'>2856</span>      *  sighex:"0b76...8"
<span class='line'>2857</span>      * };
<span class='line'>2858</span>      *
<span class='line'>2859</span>      * x.getParam({tbshex: true}) &rarr; { ... , tbshex: "30..." }
<span class='line'>2860</span>      * x.getParam({nodnarray: true}) &rarr; {issuer: {str: "/C=JP"}, ...}
<span class='line'>2861</span>      * x.getParam({dncanon: true}) &rarr; {... {issuer: {canon: "/c=jp/o=..."} ...} ...}
<span class='line'>2862</span>      * x.getParam({dnhex: true}) &rarr; {... {issuer: {hex: "30..."} ...} ...}
<span class='line'>2863</span>      */</span><span class="WHIT">
<span class='line'>2864</span> </span><span class="WHIT">    </span><span class="NAME">this.getParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">option</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2865</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2866</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">option</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">option</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2867</span> 
<span class='line'>2868</span> </span><span class="WHIT">	</span><span class="NAME">result.version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getVersion</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2869</span> </span><span class="WHIT">	</span><span class="NAME">result.serial</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.getSerialNumberHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2870</span> </span><span class="WHIT">	</span><span class="NAME">result.sigalg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureAlgorithmField</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2871</span> </span><span class="WHIT">	</span><span class="NAME">result.issuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getIssuer</span><span class="PUNC">(</span><span class="NAME">option.dncanon</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">option.dnhex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2872</span> </span><span class="WHIT">	</span><span class="NAME">result.notbefore</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getNotBefore</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2873</span> </span><span class="WHIT">	</span><span class="NAME">result.notafter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getNotAfter</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2874</span> </span><span class="WHIT">	</span><span class="NAME">result.subject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSubject</span><span class="PUNC">(</span><span class="NAME">option.dncanon</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">option.dnhex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2875</span> </span><span class="WHIT">	</span><span class="NAME">result.sbjpubkey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextopem</span><span class="PUNC">(</span><span class="NAME">this.getPublicKeyHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"PUBLIC KEY"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2876</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.aExtInfo</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>2877</span> </span><span class="WHIT">	    </span><span class="NAME">this.aExtInfo.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2878</span> </span><span class="WHIT">	    </span><span class="NAME">result.ext</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtParamArray</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2879</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2880</span> </span><span class="WHIT">	</span><span class="NAME">result.sighex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureValueHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2881</span> 
<span class='line'>2882</span> </span><span class="WHIT">	</span><span class="COMM">// for options</span><span class="WHIT">
<span class='line'>2883</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">option.tbshex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2884</span> </span><span class="WHIT">	    </span><span class="NAME">result.tbshex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2885</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2886</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">option.nodnarray</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2887</span> </span><span class="WHIT">	    </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">result.issuer.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2888</span> </span><span class="WHIT">	    </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">result.subject.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2889</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2890</span> 
<span class='line'>2891</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2892</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2893</span> 
<span class='line'>2894</span> </span><span class="WHIT">    </span><span class="COMM">/** 
<span class='line'>2895</span>      * get array of certificate extension parameter JSON object&lt;br/>
<span class='line'>2896</span>      * @name getExtParamArray
<span class='line'>2897</span>      * @memberOf X509#
<span class='line'>2898</span>      * @function
<span class='line'>2899</span>      * @param {String} hExtSeq hexadecimal string of SEQUENCE of Extension
<span class='line'>2900</span>      * @return {Array} array of certificate extension parameter JSON object
<span class='line'>2901</span>      * @since jsrsasign 9.0.0 x509 2.0.0
<span class='line'>2902</span>      * @see KJUR.asn1.x509.X509Util.newCertPEM
<span class='line'>2903</span>      * @see X509#getParam
<span class='line'>2904</span>      * @see X509#getExtParam
<span class='line'>2905</span>      * @see X509CRL#getParam
<span class='line'>2906</span>      * @see KJUR.asn1.csr.CSRUtil.getParam
<span class='line'>2907</span>      *
<span class='line'>2908</span>      * @description
<span class='line'>2909</span>      * This method returns an array of certificate extension
<span class='line'>2910</span>      * parameters. 
<span class='line'>2911</span>      * &lt;br/>
<span class='line'>2912</span>      * NOTE: Argument "hExtSeq" have been supported since jsrsasign 9.1.1.
<span class='line'>2913</span>      *
<span class='line'>2914</span>      * @example
<span class='line'>2915</span>      * x = new X509();
<span class='line'>2916</span>      * x.readCertPEM("-----BEGIN CERTIFICATE...");
<span class='line'>2917</span>      * x.getExtParamArray() &rarr;
<span class='line'>2918</span>      * [ {extname:"keyUsage",critical:true,names:["digitalSignature"]},
<span class='line'>2919</span>      *   {extname:"basicConstraints",critical:true},
<span class='line'>2920</span>      *   {extname:"subjectKeyIdentifier",kid:{hex:"f2eb..."}},
<span class='line'>2921</span>      *   {extname:"authorityKeyIdentifier",kid:{hex:"12ab..."}},
<span class='line'>2922</span>      *   {extname:"authorityInfoAccess",array:[{ocsp:"http://ocsp.example.com/"}]},
<span class='line'>2923</span>      *   {extname:"certificatePolicies",array:[{policyoid:"2.23.140.1.2.1"}]}]
<span class='line'>2924</span>      */</span><span class="WHIT">
<span class='line'>2925</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtParamArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExtSeq</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2926</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hExtSeq</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2927</span> </span><span class="WHIT">	    </span><span class="COMM">// for X.509v3 certificate</span><span class="WHIT">
<span class='line'>2928</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyListEx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"[3]"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2929</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx1</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2930</span> </span><span class="WHIT">		</span><span class="NAME">hExtSeq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyListEx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"[3]"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2931</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2932</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2933</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2934</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExtSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2935</span> 
<span class='line'>2936</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2937</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">hExtSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2938</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtParam</span><span class="PUNC">(</span><span class="NAME">hExt</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2939</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.push</span><span class="PUNC">(</span><span class="NAME">extParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2940</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>2941</span> 
<span class='line'>2942</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2943</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2944</span> 
<span class='line'>2945</span> </span><span class="WHIT">    </span><span class="COMM">/** 
<span class='line'>2946</span>      * get a extension parameter JSON object&lt;br/>
<span class='line'>2947</span>      * @name getExtParam
<span class='line'>2948</span>      * @memberOf X509#
<span class='line'>2949</span>      * @function
<span class='line'>2950</span>      * @param {String} hExt hexadecimal string of Extension
<span class='line'>2951</span>      * @return {Array} Extension parameter JSON object
<span class='line'>2952</span>      * @since jsrsasign 9.1.1 x509 2.0.1
<span class='line'>2953</span>      * @see KJUR.asn1.x509.X509Util.newCertPEM
<span class='line'>2954</span>      * @see X509#getParam
<span class='line'>2955</span>      * @see X509#getExtParamArray
<span class='line'>2956</span>      * @see X509CRL#getParam
<span class='line'>2957</span>      * @see KJUR.asn1.csr.CSRUtil.getParam
<span class='line'>2958</span>      *
<span class='line'>2959</span>      * @description
<span class='line'>2960</span>      * This method returns a extension parameters as JSON object. 
<span class='line'>2961</span>      *
<span class='line'>2962</span>      * @example
<span class='line'>2963</span>      * x = new X509();
<span class='line'>2964</span>      * ...
<span class='line'>2965</span>      * x.getExtParam("30...") &rarr;
<span class='line'>2966</span>      * {extname:"keyUsage",critical:true,names:["digitalSignature"]}
<span class='line'>2967</span>      */</span><span class="WHIT">
<span class='line'>2968</span> </span><span class="WHIT">    </span><span class="NAME">this.getExtParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hExt</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2969</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2970</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2971</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdxLen</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2972</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aIdxLen</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">aIdxLen</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2973</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"wrong number elements in Extension: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> 
<span class='line'>2974</span> 			    </span><span class="NAME">aIdxLen</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hExt</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2975</span> 
<span class='line'>2976</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_hextooidstr</span><span class="PUNC">(</span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2977</span> 
<span class='line'>2978</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2979</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aIdxLen</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">hExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"0101ff"</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>2980</span> </span><span class="WHIT">	    </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2981</span> 
<span class='line'>2982</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">hExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">aIdxLen</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2983</span> 
<span class='line'>2984</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2985</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.14"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2986</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtSubjectKeyIdentifier</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2987</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.15"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2988</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtKeyUsage</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2989</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.17"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2990</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtSubjectAltName</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2991</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.18"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2992</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtIssuerAltName</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2993</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.19"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2994</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtBasicConstraints</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2995</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.30"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2996</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtNameConstraints</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2997</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.31"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>2998</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtCRLDistributionPoints</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>2999</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.32"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3000</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtCertificatePolicies</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3001</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.33"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3002</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtPolicyMappings</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3003</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.35"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3004</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtAuthorityKeyIdentifier</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3005</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.36"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3006</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtPolicyConstraints</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3007</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.37"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3008</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtExtKeyUsage</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3009</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.54"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3010</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInhibitAnyPolicy</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3011</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.1.1"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3012</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtAuthorityInfoAccess</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3013</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.20"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3014</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtCRLNumber</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3015</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"2.5.29.21"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3016</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtCRLReason</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3017</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.48.1.2"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3018</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtOcspNonce</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3019</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"1.3.6.1.5.5.7.48.1.5"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3020</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtOcspNoCheck</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3021</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">oid</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"1.2.840.113583.1.1.9.1"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3022</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtAdobeTimeStamp</span><span class="PUNC">(</span><span class="NAME">hExtV</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3023</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">X509.EXT_PARSER</span><span class="PUNC">[</span><span class="NAME">oid</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3024</span> </span><span class="WHIT">	    </span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">X509.EXT_PARSER</span><span class="PUNC">[</span><span class="NAME">oid</span><span class="PUNC">]</span><span class="PUNC">(</span><span class="NAME">oid</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3025</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3026</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extParam</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">extParam</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3027</span> 
<span class='line'>3028</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">privateParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">extname</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oid</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">extn</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">hExtV</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3029</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">critical</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">privateParam.critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3030</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">privateParam</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3031</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3032</span> 
<span class='line'>3033</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3034</span>      * find extension parameter in array&lt;br/>
<span class='line'>3035</span>      * @name findExt
<span class='line'>3036</span>      * @memberOf X509#
<span class='line'>3037</span>      * @function
<span class='line'>3038</span>      * @param {Array} aExt array of extension parameters
<span class='line'>3039</span>      * @param {String} extname extension name
<span class='line'>3040</span>      * @return {Array} extension parameter in the array or null
<span class='line'>3041</span>      * @since jsrsasign 10.0.3 x509 2.0.7
<span class='line'>3042</span>      * @see X509#getParam
<span class='line'>3043</span>      *
<span class='line'>3044</span>      * @description
<span class='line'>3045</span>      * This method returns an extension parameter for
<span class='line'>3046</span>      * specified extension name in the array.
<span class='line'>3047</span>      * This method is useful to update extension parameter value.
<span class='line'>3048</span>      * When there is no such extension with the extname,
<span class='line'>3049</span>      * this returns "null".
<span class='line'>3050</span>      *
<span class='line'>3051</span>      * @example
<span class='line'>3052</span>      * // (1) 
<span class='line'>3053</span>      * x = new X509(CERTPEM);
<span class='line'>3054</span>      * params = x.getParam();
<span class='line'>3055</span>      * pSKID = x.findExt(params.ext, "subjectKeyIdentifier");
<span class='line'>3056</span>      * pSKID.kid = "1234abced..."; // skid in the params is updated.
<span class='line'>3057</span>      *   // then params was updated
<span class='line'>3058</span>      *
<span class='line'>3059</span>      * // (2) another example
<span class='line'>3060</span>      * aExt = [
<span class='line'>3061</span>      *   {extname:"keyUsage",critical:true,names:["digitalSignature"]},
<span class='line'>3062</span>      *   {extname:"basicConstraints",critical:true},
<span class='line'>3063</span>      *   {extname:"subjectKeyIdentifier",kid:{hex:"f2eb..."}},
<span class='line'>3064</span>      *   {extname:"authorityKeyIdentifier",kid:{hex:"12ab..."}},
<span class='line'>3065</span>      *   {extname:"authorityInfoAccess",array:[{ocsp:"http://ocsp.example.com/"}]},
<span class='line'>3066</span>      *   {extname:"certificatePolicies",array:[{policyoid:"2.23.140.1.2.1"}]}
<span class='line'>3067</span>      * ];
<span class='line'>3068</span>      * var x = new X509();
<span class='line'>3069</span>      * x.findExt(aExt, "authorityKeyInfoAccess").array[0].ocsp = "http://aaa.com";
<span class='line'>3070</span>      * pKU = x.findExt(aExt, "keyUsage");
<span class='line'>3071</span>      * delete pKU["critical"]; // clear criticla flag
<span class='line'>3072</span>      * pKU.names = ["keyCertSign", "cRLSign"];
<span class='line'>3073</span>      *   // then aExt was updated
<span class='line'>3074</span>      */</span><span class="WHIT">
<span class='line'>3075</span> </span><span class="WHIT">    </span><span class="NAME">this.findExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">extname</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3076</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aExt.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3077</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">extname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">extname</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aExt</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3078</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3079</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3080</span> 
<span class='line'>3081</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3082</span> 
<span class='line'>3083</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3084</span>      * update CRLDistributionPoints Full URI in parameter&lt;br/>
<span class='line'>3085</span>      * @name updateCDPFullURI
<span class='line'>3086</span>      * @memberOf X509#
<span class='line'>3087</span>      * @function
<span class='line'>3088</span>      * @param {Array} aExt array of extension parameters
<span class='line'>3089</span>      * @param {String} newURI string of new uri
<span class='line'>3090</span>      * @since jsrsasign 10.0.4 x509 2.0.8
<span class='line'>3091</span>      * @see X509#findExt
<span class='line'>3092</span>      * @see KJUR.asn1.x509.CRLDistributionPoints
<span class='line'>3093</span>      *
<span class='line'>3094</span>      * @description
<span class='line'>3095</span>      * This method updates Full URI of CRLDistributionPoints extension
<span class='line'>3096</span>      * in the extension parameter array if it exists.
<span class='line'>3097</span>      *
<span class='line'>3098</span>      * @example
<span class='line'>3099</span>      * aExt = [
<span class='line'>3100</span>      *   {extname:"authorityKeyIdentifier",kid:{hex:"12ab..."}},
<span class='line'>3101</span>      *   {extname:"cRLDistributionPoints",
<span class='line'>3102</span>      *    array:[{dpname:{full:[{uri:"http://example.com/a.crl"}]}}]},
<span class='line'>3103</span>      * ];
<span class='line'>3104</span>      * x = new X509();
<span class='line'>3105</span>      * x.updateCDPFullURI(aExt, "http://crl2.example.new/b.crl");
<span class='line'>3106</span>      */</span><span class="WHIT">
<span class='line'>3107</span> </span><span class="WHIT">    </span><span class="NAME">this.updateExtCDPFullURI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newURI</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3108</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.findExt</span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"cRLDistributionPoints"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3109</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pExt</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3110</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pExt.array</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3111</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aDP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pExt.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3112</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aDP.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3113</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aDP</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dpname</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3114</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aDP</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dpname.full</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3115</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aURI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aDP</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dpname.full</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3116</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aURI.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3117</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pURI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aURI</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3118</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pURI.uri</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3119</span> </span><span class="WHIT">		</span><span class="NAME">pURI.uri</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newURI</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3120</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3121</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3122</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3123</span> 
<span class='line'>3124</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3125</span>      * update authorityInfoAccess ocsp in parameter&lt;br/>
<span class='line'>3126</span>      * @name updateAIAOCSP
<span class='line'>3127</span>      * @memberOf X509#
<span class='line'>3128</span>      * @function
<span class='line'>3129</span>      * @param {Array} aExt array of extension parameters
<span class='line'>3130</span>      * @param {String} newURI string of new uri
<span class='line'>3131</span>      * @since jsrsasign 10.0.4 x509 2.0.8
<span class='line'>3132</span>      * @see X509#findExt
<span class='line'>3133</span>      * @see KJUR.asn1.x509.AuthorityInfoAccess
<span class='line'>3134</span>      *
<span class='line'>3135</span>      * @description
<span class='line'>3136</span>      * This method updates "ocsp" accessMethod URI of 
<span class='line'>3137</span>      * AuthorityInfoAccess extension
<span class='line'>3138</span>      * in the extension parameter array if it exists.
<span class='line'>3139</span>      *
<span class='line'>3140</span>      * @example
<span class='line'>3141</span>      * aExt = [
<span class='line'>3142</span>      *   {extname:"authorityKeyIdentifier",kid:{hex:"12ab..."}},
<span class='line'>3143</span>      *   {extname:"authoriyInfoAccess",
<span class='line'>3144</span>      *    array:[
<span class='line'>3145</span>      *      {ocsp: "http://ocsp1.example.com"},
<span class='line'>3146</span>      *      {caissuer: "http://example.com/a.crt"}
<span class='line'>3147</span>      *    ]}
<span class='line'>3148</span>      * ];
<span class='line'>3149</span>      * x = new X509();
<span class='line'>3150</span>      * x.updateAIAOCSP(aExt, "http://ocsp2.example.net");
<span class='line'>3151</span>      */</span><span class="WHIT">
<span class='line'>3152</span> </span><span class="WHIT">    </span><span class="NAME">this.updateExtAIAOCSP</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newURI</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3153</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.findExt</span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"authorityInfoAccess"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3154</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pExt</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3155</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pExt.array</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3156</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pExt.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3157</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3158</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">ocsp</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">ocsp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newURI</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3159</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3160</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3161</span> 
<span class='line'>3162</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3163</span>      * update authorityInfoAccess caIssuer in parameter&lt;br/>
<span class='line'>3164</span>      * @name updateAIACAIssuer
<span class='line'>3165</span>      * @memberOf X509#
<span class='line'>3166</span>      * @function
<span class='line'>3167</span>      * @param {Array} aExt array of extension parameters
<span class='line'>3168</span>      * @param {String} newURI string of new uri
<span class='line'>3169</span>      * @since jsrsasign 10.0.4 x509 2.0.8
<span class='line'>3170</span>      * @see X509#findExt
<span class='line'>3171</span>      * @see KJUR.asn1.x509.AuthorityInfoAccess
<span class='line'>3172</span>      *
<span class='line'>3173</span>      * @description
<span class='line'>3174</span>      * This method updates "caIssuer" accessMethod URI of 
<span class='line'>3175</span>      * AuthorityInfoAccess extension
<span class='line'>3176</span>      * in the extension parameter array if it exists.
<span class='line'>3177</span>      *
<span class='line'>3178</span>      * @example
<span class='line'>3179</span>      * aExt = [
<span class='line'>3180</span>      *   {extname:"authorityKeyIdentifier",kid:{hex:"12ab..."}},
<span class='line'>3181</span>      *   {extname:"authoriyInfoAccess",
<span class='line'>3182</span>      *    array:[
<span class='line'>3183</span>      *      {ocsp: "http://ocsp1.example.com"},
<span class='line'>3184</span>      *      {caissuer: "http://example.com/a.crt"}
<span class='line'>3185</span>      *    ]}
<span class='line'>3186</span>      * ];
<span class='line'>3187</span>      * x = new X509();
<span class='line'>3188</span>      * x.updateAIACAIssuer(aExt, "http://example.net/b.crt");
<span class='line'>3189</span>      */</span><span class="WHIT">
<span class='line'>3190</span> </span><span class="WHIT">    </span><span class="NAME">this.updateExtAIACAIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newURI</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3191</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.findExt</span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"authorityInfoAccess"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3192</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pExt</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3193</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pExt.array</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3194</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pExt.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3195</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3196</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">caissuer</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">caissuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newURI</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3197</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3198</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3199</span> 
<span class='line'>3200</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3201</span>      * convert array for X500 distinguish name to distinguish name string&lt;br/>
<span class='line'>3202</span>      * @name dnarraytostr
<span class='line'>3203</span>      * @memberOf X509#
<span class='line'>3204</span>      * @function
<span class='line'>3205</span>      * @param {Array} aDN array for X500 distinguish name
<span class='line'>3206</span>      * @return {String} distinguish name
<span class='line'>3207</span>      * @since jsrsasign 10.0.6 x509 2.0.8
<span class='line'>3208</span>      * @see X509#getX500Name
<span class='line'>3209</span>      * @see X509#getX500NameArray
<span class='line'>3210</span>      * @see KJUR.asn1.x509.X500Name
<span class='line'>3211</span>      *
<span class='line'>3212</span>      * @description
<span class='line'>3213</span>      * This method converts from an array representation of 
<span class='line'>3214</span>      * X.500 distinguished name to X.500 name string.
<span class='line'>3215</span>      * This supports multi-valued RDN.
<span class='line'>3216</span>      * 
<span class='line'>3217</span>      * @example
<span class='line'>3218</span>      * var x = new X509();
<span class='line'>3219</span>      * x.dnarraytostr(
<span class='line'>3220</span>      *   [[{type:"C",value:"JP",ds:"prn"}],
<span class='line'>3221</span>      *   [{type:"O",value:"T1",ds:"prn"}]]) &rarr; "/C=JP/O=T1"
<span class='line'>3222</span>      * x.dnarraytostr(
<span class='line'>3223</span>      *   [[{type:"C",value:"JP",ds:"prn"}],
<span class='line'>3224</span>      *   [{type:"O",value:"T1",ds:"prn"}
<span class='line'>3225</span>      *    {type:"CN",value:"Bob",ds:"prn"}]]) &rarr; "/C=JP/O=T1+CN=Bob"
<span class='line'>3226</span>      */</span><span class="WHIT">
<span class='line'>3227</span> </span><span class="WHIT">    </span><span class="NAME">this.dnarraytostr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aDN</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3228</span> </span><span class="WHIT">	</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">rdnarraytostr</span><span class="PUNC">(</span><span class="NAME">aRDN</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3229</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aRDN.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">atvtostr</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/\+/</span><span class="PUNC">,</span><span class="STRN">"\\+"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">join</span><span class="PUNC">(</span><span class="STRN">"+"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3230</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3231</span> 
<span class='line'>3232</span> </span><span class="WHIT">	</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">atvtostr</span><span class="PUNC">(</span><span class="NAME">pATV</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3233</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">pATV.type</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pATV.value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3234</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3235</span> 
<span class='line'>3236</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">aDN.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">rdnarraytostr</span><span class="PUNC">(</span><span class="NAME">x</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/\//</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"\\/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">join</span><span class="PUNC">(</span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3237</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3238</span> 
<span class='line'>3239</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3240</span>      * set canonicalized DN to a DN parameter&lt;br/>
<span class='line'>3241</span>      * @name setCanonicalizedDN
<span class='line'>3242</span>      * @memberOf X509#
<span class='line'>3243</span>      * @function
<span class='line'>3244</span>      * @param {object} pDN DN parameter associative array
<span class='line'>3245</span>      * @since jsrsasign 10.6.0 x509 2.1.0
<span class='line'>3246</span>      * 
<span class='line'>3247</span>      * @description
<span class='line'>3248</span>      * This method canonicalizes a DN string as following:
<span class='line'>3249</span>      * &lt;ul>
<span class='line'>3250</span>      * &lt;li>convert to lower case&lt;/li>
<span class='line'>3251</span>      * &lt;li>convert from all multiple spaces to a space&lt;/li>
<span class='line'>3252</span>      * &lt;/ul>
<span class='line'>3253</span>      * 
<span class='line'>3254</span>      * @example
<span class='line'>3255</span>      * var x = new X509();
<span class='line'>3256</span>      * var pDN = {
<span class='line'>3257</span>      *   array: [
<span class='line'>3258</span>      *     [{type:'C',value:'JP',ds:'prn'}],
<span class='line'>3259</span>      *     [{type:'O',value:'Test    1',ds:'prn'}] ],
<span class='line'>3260</span>      *   str: "/C=JP/O=Test    1" };
<span class='line'>3261</span>      * x.setCanonicalizedDN(pDN);
<span class='line'>3262</span> 
<span class='line'>3263</span>      * // pDN will become following
<span class='line'>3264</span>      * pDN = {
<span class='line'>3265</span>      *   array: [
<span class='line'>3266</span>      *     [{type:'C',value:'JP',ds:'prn'}],
<span class='line'>3267</span>      *     [{type:'O',value:'Test    1',ds:'prn'}] ],
<span class='line'>3268</span>      *   str: "/C=JP/O=Test    1",
<span class='line'>3269</span>      *   canon: "/c=jp/o=test 1" };
<span class='line'>3270</span>      */</span><span class="WHIT">
<span class='line'>3271</span> </span><span class="WHIT">    </span><span class="NAME">this.setCanonicalizedDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">pDN</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3272</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aRDN</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3273</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pDN.str</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">pDN.array</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3274</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.X500Name</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">str</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">pDN.str</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3275</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dDN.tohex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3276</span> </span><span class="WHIT">	    </span><span class="NAME">aRDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getX500NameArray</span><span class="PUNC">(</span><span class="NAME">hDN</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3277</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3278</span> </span><span class="WHIT">	    </span><span class="NAME">aRDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pDN.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3279</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3280</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pDN.canon</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3281</span> </span><span class="WHIT">	    </span><span class="NAME">pDN.canon</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.c14nRDNArray</span><span class="PUNC">(</span><span class="NAME">aRDN</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3282</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3283</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3284</span> 
<span class='line'>3285</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3286</span>      * simple canonicalization(c14n) for RDN array&lt;br/>
<span class='line'>3287</span>      * @name c14nRDNArray
<span class='line'>3288</span>      * @memberOf X509#
<span class='line'>3289</span>      * @function
<span class='line'>3290</span>      * @param {array} aRDN array of RDN parameters
<span class='line'>3291</span>      * @return {string} canonicalized distinguish name (ex. "/c=jp/o=test ca")
<span class='line'>3292</span>      * @since jsrsasign 10.6.0 x509 2.1.0
<span class='line'>3293</span>      * 
<span class='line'>3294</span>      * @description
<span class='line'>3295</span>      * This method canonicalizes a DN string according to
<span class='line'>3296</span>      * &lt;a href="https://datatracker.ietf.org/doc/html/rfc4518#appendix-B">
<span class='line'>3297</span>      * "RFC 4518 StringPrep Appendix B Substring Matching"&lt;/a> as following:
<span class='line'>3298</span>      * &lt;ul>
<span class='line'>3299</span>      * &lt;li>convert to lower case&lt;/li>
<span class='line'>3300</span>      * &lt;li>convert from all sequence of spaces to a space&lt;/li>
<span class='line'>3301</span>      * &lt;li>remove leading and trailing spaces&lt;/li>
<span class='line'>3302</span>      * &lt;/ul>
<span class='line'>3303</span>      * 
<span class='line'>3304</span>      * @example
<span class='line'>3305</span>      * var x = new X509();
<span class='line'>3306</span>      * x.c14nRDNArray([
<span class='line'>3307</span>      *   [{type:"C", value:"JP", ds: "prn"}],
<span class='line'>3308</span>      *   [{type:"O", value:"    Test    1234     ", ds: "utf8"}],
<span class='line'>3309</span>      *   [{type:"OU", value:"HR   45", ds: "utf8"}]
<span class='line'>3310</span>      * ]) &rarr; "/c=jp/o=test 1234/ou=hr 45"
<span class='line'>3311</span>      */</span><span class="WHIT">
<span class='line'>3312</span> </span><span class="WHIT">    </span><span class="NAME">this.c14nRDNArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aRDN</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3313</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3314</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aRDN.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3315</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aAVA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aRDN</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3316</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3317</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aAVA.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3318</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pAVA</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aAVA</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3319</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pAVA.value</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3320</span> </span><span class="WHIT">		</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value.replace</span><span class="PUNC">(</span><span class="REGX">/^\s*/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3321</span> </span><span class="WHIT">		</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value.replace</span><span class="PUNC">(</span><span class="REGX">/\s*$/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3322</span> </span><span class="WHIT">		</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value.replace</span><span class="PUNC">(</span><span class="REGX">/\s+/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3323</span> </span><span class="WHIT">		</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value.toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3324</span> </span><span class="WHIT">		</span><span class="NAME">a2.push</span><span class="PUNC">(</span><span class="NAME">pAVA.type.toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3325</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3326</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">a2.join</span><span class="PUNC">(</span><span class="STRN">"+"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3327</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3328</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"/"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">a.join</span><span class="PUNC">(</span><span class="STRN">"/"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3329</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3330</span> 
<span class='line'>3331</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>3332</span>      * get certificate information as string.&lt;br/>
<span class='line'>3333</span>      * @name getInfo
<span class='line'>3334</span>      * @memberOf X509#
<span class='line'>3335</span>      * @function
<span class='line'>3336</span>      * @return {String} certificate information string
<span class='line'>3337</span>      * @since jsrsasign 5.0.10 x509 1.1.8
<span class='line'>3338</span>      * @example
<span class='line'>3339</span>      * x = new X509();
<span class='line'>3340</span>      * x.readCertPEM(certPEM);
<span class='line'>3341</span>      * console.log(x.getInfo());
<span class='line'>3342</span>      * // this shows as following
<span class='line'>3343</span>      * Basic Fields
<span class='line'>3344</span>      *   serial number: 02ac5c266a0b409b8f0b79f2ae462577
<span class='line'>3345</span>      *   signature algorithm: SHA1withRSA
<span class='line'>3346</span>      *   issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
<span class='line'>3347</span>      *   notBefore: 061110000000Z
<span class='line'>3348</span>      *   notAfter: 311110000000Z
<span class='line'>3349</span>      *   subject: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
<span class='line'>3350</span>      *   subject public key info:
<span class='line'>3351</span>      *     key algorithm: RSA
<span class='line'>3352</span>      *     n=c6cce573e6fbd4bb...
<span class='line'>3353</span>      *     e=10001
<span class='line'>3354</span>      * X509v3 Extensions:
<span class='line'>3355</span>      *   keyUsage CRITICAL:
<span class='line'>3356</span>      *     digitalSignature,keyCertSign,cRLSign
<span class='line'>3357</span>      *   basicConstraints CRITICAL:
<span class='line'>3358</span>      *     cA=true
<span class='line'>3359</span>      *   subjectKeyIdentifier :
<span class='line'>3360</span>      *     b13ec36903f8bf4701d498261a0802ef63642bc3
<span class='line'>3361</span>      *   authorityKeyIdentifier :
<span class='line'>3362</span>      *     kid=b13ec36903f8bf4701d498261a0802ef63642bc3
<span class='line'>3363</span>      * signature algorithm: SHA1withRSA
<span class='line'>3364</span>      * signature: 1c1a0697dcd79c9f...
<span class='line'>3365</span>      */</span><span class="WHIT">
<span class='line'>3366</span> </span><span class="WHIT">    </span><span class="NAME">this.getInfo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3367</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getSubjectAltNameStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3368</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3369</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">indent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3370</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">NL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3371</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3372</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3373</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pGN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3374</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pGN.dn</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">indent</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"dn: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pGN.dn.str</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NL</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3375</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pGN.ip</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">indent</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"ip: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pGN.ip</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NL</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3376</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pGN.rfc822</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">indent</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"rfc822: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pGN.rfc822</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NL</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3377</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pGN.dns</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">indent</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"dns: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pGN.dns</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NL</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3378</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pGN.uri</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">indent</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"uri: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pGN.uri</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NL</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3379</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pGN.other</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3380</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oidname</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pGN.other.oid</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3381</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">JSON.stringify</span><span class="PUNC">(</span><span class="NAME">pGN.other.value</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/\"/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3382</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">indent</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"other: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">oidname</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">NL</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3383</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3384</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3385</span> </span><span class="WHIT">	    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">s.replace</span><span class="PUNC">(</span><span class="REGX">/\n$/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3386</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3387</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3388</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getCertificatePoliciesStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3389</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3390</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3391</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3392</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pi</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3393</span> </span><span class="WHIT">		</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    policy oid: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pi.policyoid</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3394</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pi.array</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3395</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">pi.array.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3396</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pqi</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pi.array</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3397</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pqi.cps</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3398</span> </span><span class="WHIT">			</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    cps: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pqi.cps</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3399</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3400</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3401</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3402</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3403</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3404</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getCRLDistributionPointsStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3405</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3406</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3407</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3408</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">dp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3409</span> </span><span class="WHIT">		</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3410</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dp.dpname.full</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">uri</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3411</span> </span><span class="WHIT">			</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">dp.dpname.full</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">uri</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3412</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3413</span> </span><span class="WHIT">		</span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3414</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">dp.dname.full</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dn.hex</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3415</span> </span><span class="WHIT">			</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">X509.hex2dn</span><span class="PUNC">(</span><span class="NAME">dp.dpname.full</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">dn.hex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3416</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">ex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3417</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3418</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3419</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3420</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getAuthorityInfoAccessStr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3421</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3422</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3423</span> </span><span class="WHIT">	    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3424</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3425</span> 
<span class='line'>3426</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ad.caissuer</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3427</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    caissuer: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">ad.caissuer</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3428</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ad.ocsp</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3429</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    ocsp: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">ad.ocsp</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3430</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3431</span> </span><span class="WHIT">	    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3432</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3433</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_X509</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3434</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pubkey</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aExt</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3435</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT">  </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"Basic Fields\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3436</span> </span><span class="WHIT">        </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  serial number: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getSerialNumberHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3437</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  signature algorithm: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getSignatureAlgorithmField</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3438</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  issuer: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getIssuerString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3439</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  notBefore: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getNotBefore</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3440</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  notAfter: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getNotAfter</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3441</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  subject: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getSubjectString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3442</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  subject public key info: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3443</span> 
<span class='line'>3444</span> </span><span class="WHIT">	</span><span class="COMM">// subject public key info</span><span class="WHIT">
<span class='line'>3445</span> </span><span class="WHIT">	</span><span class="NAME">pubkey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getPublicKey</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3446</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    key algorithm: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">pubkey.type</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3447</span> 
<span class='line'>3448</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">pubkey.type</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"RSA"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3449</span> </span><span class="WHIT">	    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    n="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hextoposhex</span><span class="PUNC">(</span><span class="NAME">pubkey.n.toString</span><span class="PUNC">(</span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"...\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3450</span> </span><span class="WHIT">	    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    e="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hextoposhex</span><span class="PUNC">(</span><span class="NAME">pubkey.e.toString</span><span class="PUNC">(</span><span class="NUMB">16</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3451</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3452</span> 
<span class='line'>3453</span> </span><span class="WHIT">	</span><span class="COMM">// X.509v3 Extensions</span><span class="WHIT">
<span class='line'>3454</span> </span><span class="WHIT">        </span><span class="NAME">aExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.aExtInfo</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3455</span> 
<span class='line'>3456</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aExt</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">aExt</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3457</span> </span><span class="WHIT">            </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"X509v3 Extensions:\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3458</span> </span><span class="WHIT">	    
<span class='line'>3459</span>             </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aExt.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3460</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">info</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aExt</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3461</span> 
<span class='line'>3462</span> </span><span class="WHIT">		</span><span class="COMM">// show extension name and critical flag</span><span class="WHIT">
<span class='line'>3463</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.oid2name</span><span class="PUNC">(</span><span class="NAME">info</span><span class="PUNC">[</span><span class="STRN">"oid"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3464</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">info</span><span class="PUNC">[</span><span class="STRN">"oid"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3465</span> 
<span class='line'>3466</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3467</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">info</span><span class="PUNC">[</span><span class="STRN">"critical"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"CRITICAL"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3468</span> 
<span class='line'>3469</span> </span><span class="WHIT">		</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"  "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">critical</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">":\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3470</span> 
<span class='line'>3471</span> </span><span class="WHIT">		</span><span class="COMM">// show extension value if supported</span><span class="WHIT">
<span class='line'>3472</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"basicConstraints"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3473</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtBasicConstraints</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3474</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">bc.cA</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3475</span> </span><span class="WHIT">			</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    {}\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3476</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3477</span> </span><span class="WHIT">			</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    cA=true"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3478</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">bc.pathLen</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3479</span> </span><span class="WHIT">			    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">", pathLen="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">bc.pathLen</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3480</span> </span><span class="WHIT">			</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3481</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3482</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"policyMappings"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3483</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtPolicyMappings</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3484</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sMap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">item</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3485</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPolicy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3486</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aPolicy</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">":"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">aPolicy</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3487</span> </span><span class="WHIT">		    </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">join</span><span class="PUNC">(</span><span class="STRN">", "</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3488</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">sMap</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3489</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"policyConstraints"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3490</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtPolicyConstraints</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3491</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3492</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">p.reqexp</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">" reqexp="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">p.reqexp</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3493</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">p.inhibit</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">" inhibit="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">p.inhibit</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3494</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3495</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"inhibitAnyPolicy"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3496</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtInhibitAnyPolicy</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3497</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    skip="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">p.skip</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3498</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"keyUsage"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3499</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getExtKeyUsageString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3500</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"subjectKeyIdentifier"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3501</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getExtSubjectKeyIdentifier</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">kid.hex</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3502</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"authorityKeyIdentifier"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3503</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">akid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtAuthorityKeyIdentifier</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3504</span> </span><span class="WHIT">		    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">akid.kid</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3505</span> </span><span class="WHIT">			</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    kid="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">akid.kid.hex</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3506</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"extKeyUsage"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3507</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">eku</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtExtKeyUsage</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3508</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"    "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">eku.join</span><span class="PUNC">(</span><span class="STRN">", "</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3509</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"subjectAltName"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3510</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">san</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getSubjectAltNameStr</span><span class="PUNC">(</span><span class="NAME">this.getExtSubjectAltName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3511</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">san</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3512</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"cRLDistributionPoints"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3513</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">cdp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtCRLDistributionPoints</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3514</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getCRLDistributionPointsStr</span><span class="PUNC">(</span><span class="NAME">cdp</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3515</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"authorityInfoAccess"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3516</span> </span><span class="WHIT">		    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aia</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getExtAuthorityInfoAccess</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3517</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getAuthorityInfoAccessStr</span><span class="PUNC">(</span><span class="NAME">aia</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3518</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">extName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"certificatePolicies"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3519</span> </span><span class="WHIT">		    </span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getCertificatePoliciesStr</span><span class="PUNC">(</span><span class="NAME">this.getExtCertificatePolicies</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3520</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3521</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3522</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3523</span> 
<span class='line'>3524</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"signature algorithm: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getSignatureAlgorithmName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3525</span> </span><span class="WHIT">	</span><span class="NAME">s</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"signature: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.getSignatureValueHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">substr</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"...\n"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3526</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3527</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3528</span> 
<span class='line'>3529</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3530</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.indexOf</span><span class="PUNC">(</span><span class="STRN">"-----BEGIN"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3531</span> </span><span class="WHIT">	    </span><span class="NAME">this.readCertPEM</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3532</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">KJUR.lang.String.isHex</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3533</span> </span><span class="WHIT">	    </span><span class="NAME">this.readCertHex</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3534</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3535</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3536</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3537</span> </span><span class="COMM">// ----- END of X509 class -----</span><span class="WHIT">
<span class='line'>3538</span> 
<span class='line'>3539</span> </span><span class="COMM">/**
<span class='line'>3540</span>  * additional definition for X.509 extension parsers&lt;br/>
<span class='line'>3541</span>  * @see X509.registExtParser
<span class='line'>3542</span>  */</span><span class="WHIT">
<span class='line'>3543</span> </span><span class="NAME">X509.EXT_PARSER</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3544</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3545</span> 
<span class='line'>3546</span> </span><span class="COMM">/**
<span class='line'>3547</span>  * define X.509 extension parser for specified OID&lt;br/>
<span class='line'>3548</span>  * @name registExtParser
<span class='line'>3549</span>  * @memberOf X509
<span class='line'>3550</span>  * @function
<span class='line'>3551</span>  * @param {string} oid extension OID string (ex. "1.2.3.4")
<span class='line'>3552</span>  * @param {function} func registering func extension value parsing function
<span class='line'>3553</span>  * @return unspecified
<span class='line'>3554</span>  * @since jsrsasign 10.7.0 x509 2.1.2
<span class='line'>3555</span>  * 
<span class='line'>3556</span>  * @description
<span class='line'>3557</span>  * &lt;p>
<span class='line'>3558</span>  * This static method specifies a X.509 extension value parsing function
<span class='line'>3559</span>  * for specified an extension OID.
<span class='line'>3560</span>  * &lt;/p>
<span class='line'>3561</span>  * &lt;p>
<span class='line'>3562</span>  * Extension parser function must have following three arguments:
<span class='line'>3563</span>  * &lt;ul>
<span class='line'>3564</span>  * &lt;li>{string} oid - OID for extension (ex. "1.2.3.4")&lt;/li>
<span class='line'>3565</span>  * &lt;li>{boolean} critical - critical flag of extension&lt;/li>
<span class='line'>3566</span>  * &lt;li>{string} hExtV - hexadecimal string of extension value&lt;/li>
<span class='line'>3567</span>  * &lt;/ul>
<span class='line'>3568</span>  * The funcition must return an associative array for the extension
<span class='line'>3569</span>  * when hExtV can be parsed properly. Otherwise it must return
<span class='line'>3570</span>  * value "undefined".
<span class='line'>3571</span>  * &lt;/p>
<span class='line'>3572</span>  *
<span class='line'>3573</span>  * @example
<span class='line'>3574</span>  * function _extparser1(oid, critical, hExtV) {
<span class='line'>3575</span>  *   try {
<span class='line'>3576</span>  *     var result = { extname: oid, value: ASN1HEX.parse(hExtV).utf8str.str };
<span class='line'>3577</span>  *     if (critical) result.critical = true;
<span class='line'>3578</span>  *     return result;
<span class='line'>3579</span>  *   } catch(ex) {
<span class='line'>3580</span>  *     return undefined;
<span class='line'>3581</span>  *   }
<span class='line'>3582</span>  * }
<span class='line'>3583</span>  * X509.registExtParser("1.2.3.4", _extparser1);
<span class='line'>3584</span>  */</span><span class="WHIT">
<span class='line'>3585</span> </span><span class="NAME">X509.registExtParser</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oid</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3586</span> </span><span class="WHIT">    </span><span class="NAME">X509.EXT_PARSER</span><span class="PUNC">[</span><span class="NAME">oid</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3587</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3588</span> 
<span class='line'>3589</span> </span><span class="COMM">/**
<span class='line'>3590</span>  * get distinguished name string in OpenSSL online format from hexadecimal string of ASN.1 DER X.500 name&lt;br/>
<span class='line'>3591</span>  * @name hex2dn
<span class='line'>3592</span>  * @memberOf X509
<span class='line'>3593</span>  * @function
<span class='line'>3594</span>  * @param {String} hex hexadecimal string of ASN.1 DER distinguished name
<span class='line'>3595</span>  * @param {Integer} idx index of hexadecimal string (DEFAULT=0)
<span class='line'>3596</span>  * @return {String} OpenSSL online format distinguished name
<span class='line'>3597</span>  * @description
<span class='line'>3598</span>  * This static method converts from a hexadecimal string of 
<span class='line'>3599</span>  * distinguished name (DN)
<span class='line'>3600</span>  * specified by 'hex' and 'idx' to OpenSSL oneline string representation (ex. /C=US/O=a).
<span class='line'>3601</span>  * @example
<span class='line'>3602</span>  * X509.hex2dn("3031310b3...") &rarr; /C=US/O=a/CN=b2+OU=b1
<span class='line'>3603</span>  */</span><span class="WHIT">
<span class='line'>3604</span> </span><span class="NAME">X509.hex2dn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3605</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3606</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3607</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX.getTLV</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3608</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pDN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getX500Name</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3609</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">pDN.str</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3610</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3611</span> 
<span class='line'>3612</span> </span><span class="COMM">/**
<span class='line'>3613</span>  * get relative distinguished name string in OpenSSL online format from hexadecimal string of ASN.1 DER RDN&lt;br/>
<span class='line'>3614</span>  * @name hex2rdn
<span class='line'>3615</span>  * @memberOf X509
<span class='line'>3616</span>  * @function
<span class='line'>3617</span>  * @param {String} hex hexadecimal string of ASN.1 DER concludes relative distinguished name
<span class='line'>3618</span>  * @param {Integer} idx index of hexadecimal string (DEFAULT=0)
<span class='line'>3619</span>  * @return {String} OpenSSL online format relative distinguished name
<span class='line'>3620</span>  * @description
<span class='line'>3621</span>  * This static method converts from a hexadecimal string of 
<span class='line'>3622</span>  * relative distinguished name (RDN)
<span class='line'>3623</span>  * specified by 'hex' and 'idx' to LDAP string representation (ex. O=test+CN=test).&lt;br/>
<span class='line'>3624</span>  * NOTE: Multi-valued RDN is supported since jsnrsasign 6.2.2 x509 1.1.10.
<span class='line'>3625</span>  * @example
<span class='line'>3626</span>  * X509.hex2rdn("310a3008060355040a0c0161") &rarr; O=a
<span class='line'>3627</span>  * X509.hex2rdn("31143008060355040a0c01613008060355040a0c0162") &rarr; O=a+O=b
<span class='line'>3628</span>  */</span><span class="WHIT">
<span class='line'>3629</span> </span><span class="NAME">X509.hex2rdn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3630</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3631</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hex.substr</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"31"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed RDN"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3632</span> 
<span class='line'>3633</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3634</span> 
<span class='line'>3635</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX.getChildIdx</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3636</span> </span><span class="WHIT">    </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3637</span> </span><span class="WHIT">	</span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">X509.hex2attrTypeValue</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3638</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>3639</span> 
<span class='line'>3640</span> </span><span class="WHIT">    </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a.map</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">s.replace</span><span class="PUNC">(</span><span class="STRN">"+"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"\\+"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3641</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a.join</span><span class="PUNC">(</span><span class="STRN">"+"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3642</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3643</span> 
<span class='line'>3644</span> </span><span class="COMM">/**
<span class='line'>3645</span>  * get string from hexadecimal string of ASN.1 DER AttributeTypeAndValue&lt;br/>
<span class='line'>3646</span>  * @name hex2attrTypeValue
<span class='line'>3647</span>  * @memberOf X509
<span class='line'>3648</span>  * @function
<span class='line'>3649</span>  * @param {String} hex hexadecimal string of ASN.1 DER concludes AttributeTypeAndValue
<span class='line'>3650</span>  * @param {Integer} idx index of hexadecimal string (DEFAULT=0)
<span class='line'>3651</span>  * @return {String} string representation of AttributeTypeAndValue (ex. C=US)
<span class='line'>3652</span>  * @description
<span class='line'>3653</span>  * This static method converts from a hexadecimal string of AttributeTypeAndValue
<span class='line'>3654</span>  * specified by 'hex' and 'idx' to LDAP string representation (ex. C=US).
<span class='line'>3655</span>  * @example
<span class='line'>3656</span>  * X509.hex2attrTypeValue("3008060355040a0c0161") &rarr; O=a
<span class='line'>3657</span>  * X509.hex2attrTypeValue("300806035504060c0161") &rarr; C=a
<span class='line'>3658</span>  * X509.hex2attrTypeValue("...3008060355040a0c0161...", 128) &rarr; O=a
<span class='line'>3659</span>  */</span><span class="WHIT">
<span class='line'>3660</span> </span><span class="NAME">X509.hex2attrTypeValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3661</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3662</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3663</span> 
<span class='line'>3664</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3665</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hex.substr</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="WHIT"> 
<span class='line'>3666</span> 	</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed attribute type and value"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3667</span> 
<span class='line'>3668</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getChildIdx</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3669</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aIdx.length</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">hex.substr</span><span class="PUNC">(</span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>3670</span> </span><span class="WHIT">	</span><span class="STRN">"malformed attribute type and value"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3671</span> 
<span class='line'>3672</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oidHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3673</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oidInt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ASN1Util.oidHexToInt</span><span class="PUNC">(</span><span class="NAME">oidHex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3674</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">atype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.x509.OID.oid2atype</span><span class="PUNC">(</span><span class="NAME">oidInt</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3675</span> 
<span class='line'>3676</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3677</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">rawV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextorstr</span><span class="PUNC">(</span><span class="NAME">hV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3678</span> 
<span class='line'>3679</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">atype</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"="</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">rawV</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3680</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3681</span> 
<span class='line'>3682</span> </span><span class="COMM">/**
<span class='line'>3683</span>  * get RSA/DSA/ECDSA public key object from X.509 certificate hexadecimal string&lt;br/>
<span class='line'>3684</span>  * @name getPublicKeyFromCertHex
<span class='line'>3685</span>  * @memberOf X509
<span class='line'>3686</span>  * @function
<span class='line'>3687</span>  * @param {String} h hexadecimal string of X.509 certificate for RSA/ECDSA/DSA public key
<span class='line'>3688</span>  * @return returns RSAKey/KJUR.crypto.{ECDSA,DSA} object of public key
<span class='line'>3689</span>  * @since jsrasign 7.1.0 x509 1.1.11
<span class='line'>3690</span>  */</span><span class="WHIT">
<span class='line'>3691</span> </span><span class="NAME">X509.getPublicKeyFromCertHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3692</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3693</span> </span><span class="WHIT">    </span><span class="NAME">x.readCertHex</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3694</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">x.getPublicKey</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3695</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3696</span> 
<span class='line'>3697</span> </span><span class="COMM">/**
<span class='line'>3698</span>  * get RSA/DSA/ECDSA public key object from PEM certificate string
<span class='line'>3699</span>  * @name getPublicKeyFromCertPEM
<span class='line'>3700</span>  * @memberOf X509
<span class='line'>3701</span>  * @function
<span class='line'>3702</span>  * @param {String} sCertPEM PEM formatted RSA/ECDSA/DSA X.509 certificate
<span class='line'>3703</span>  * @return returns RSAKey/KJUR.crypto.{ECDSA,DSA} object of public key
<span class='line'>3704</span>  * @since x509 1.1.1
<span class='line'>3705</span>  * @description
<span class='line'>3706</span>  * NOTE: DSA is also supported since x509 1.1.2.
<span class='line'>3707</span>  */</span><span class="WHIT">
<span class='line'>3708</span> </span><span class="NAME">X509.getPublicKeyFromCertPEM</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sCertPEM</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3709</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3710</span> </span><span class="WHIT">    </span><span class="NAME">x.readCertPEM</span><span class="PUNC">(</span><span class="NAME">sCertPEM</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3711</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">x.getPublicKey</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3712</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3713</span> 
<span class='line'>3714</span> </span><span class="COMM">/**
<span class='line'>3715</span>  * get public key information from PEM certificate
<span class='line'>3716</span>  * @name getPublicKeyInfoPropOfCertPEM
<span class='line'>3717</span>  * @memberOf X509
<span class='line'>3718</span>  * @function
<span class='line'>3719</span>  * @param {String} sCertPEM string of PEM formatted certificate
<span class='line'>3720</span>  * @return {Hash} hash of information for public key
<span class='line'>3721</span>  * @since x509 1.1.1
<span class='line'>3722</span>  * @description
<span class='line'>3723</span>  * Resulted associative array has following properties:&lt;br/>
<span class='line'>3724</span>  * &lt;ul>
<span class='line'>3725</span>  * &lt;li>algoid - hexadecimal string of OID of asymmetric key algorithm&lt;/li>
<span class='line'>3726</span>  * &lt;li>algparam - hexadecimal string of OID of ECC curve name or null&lt;/li>
<span class='line'>3727</span>  * &lt;li>keyhex - hexadecimal string of key in the certificate&lt;/li>
<span class='line'>3728</span>  * &lt;/ul>
<span class='line'>3729</span>  * NOTE: X509v1 certificate is also supported since x509.js 1.1.9.
<span class='line'>3730</span>  */</span><span class="WHIT">
<span class='line'>3731</span> </span><span class="NAME">X509.getPublicKeyInfoPropOfCertPEM</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sCertPEM</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>3732</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3733</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getVbyList</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3734</span> 
<span class='line'>3735</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3736</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">hSPKI</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pubkey</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3737</span> </span><span class="WHIT">    </span><span class="NAME">result.algparam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3738</span> 
<span class='line'>3739</span> </span><span class="WHIT">    </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3740</span> </span><span class="WHIT">    </span><span class="NAME">x.readCertPEM</span><span class="PUNC">(</span><span class="NAME">sCertPEM</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3741</span> 
<span class='line'>3742</span> </span><span class="WHIT">    </span><span class="NAME">hSPKI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getPublicKeyHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3743</span> </span><span class="WHIT">    </span><span class="NAME">result.keyhex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hSPKI</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"03"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">substr</span><span class="PUNC">(</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3744</span> </span><span class="WHIT">    </span><span class="NAME">result.algoid</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hSPKI</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3745</span> 
<span class='line'>3746</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result.algoid</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"2a8648ce3d0201"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// ecPublicKey</span><span class="WHIT">
<span class='line'>3747</span> </span><span class="WHIT">	</span><span class="NAME">result.algparam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hSPKI</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"06"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3748</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3749</span> 
<span class='line'>3750</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3751</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3752</span> 
<span class='line'>3753</span> </span><span class="COMM">/* ======================================================================
<span class='line'>3754</span>  *   Specific V3 Extensions
<span class='line'>3755</span>  * ====================================================================== */</span><span class="WHIT">
<span class='line'>3756</span> 
<span class='line'>3757</span> </span><span class="NAME">X509.KEYUSAGE_NAME</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
<span class='line'>3758</span> </span><span class="WHIT">    </span><span class="STRN">"digitalSignature"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3759</span> </span><span class="WHIT">    </span><span class="STRN">"nonRepudiation"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3760</span> </span><span class="WHIT">    </span><span class="STRN">"keyEncipherment"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3761</span> </span><span class="WHIT">    </span><span class="STRN">"dataEncipherment"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3762</span> </span><span class="WHIT">    </span><span class="STRN">"keyAgreement"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3763</span> </span><span class="WHIT">    </span><span class="STRN">"keyCertSign"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3764</span> </span><span class="WHIT">    </span><span class="STRN">"cRLSign"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3765</span> </span><span class="WHIT">    </span><span class="STRN">"encipherOnly"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>3766</span> </span><span class="WHIT">    </span><span class="STRN">"decipherOnly"</span><span class="WHIT">
<span class='line'>3767</span> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>3768</span> </span></pre></body></html>